Sorry if this is the wrong list, but maybe someone can help.
I'm really new to tcl and I'm writing a expect script and need to test if a file exists and if it does remove it. I can't seem to find/figure out syntax for the 'if' or testing of a file. Can someone give the the syntax?
Here's what I'm looking for:
if file exists AFILE ; then
exec rm AFILE
ENDIF
Thanks for any help.
LEE
I'm really new to tcl and I'm writing a expect script and need to test if a file exists and if it does remove it. I can't seem to find/figure out syntax for the 'if' or testing of a file. Can someone give the the syntax?
Here's what I'm looking for:
if file exists AFILE ; then
exec rm AFILE
ENDIF
Thanks for any help.
LEE