Very Basic expect script - What am I missing?
Hi -
I'm sure there is a simple answer to this question - I have a very basic expect script: Code:
#!/usr/bin/expect -f touch blah.ver (to create a test file) check with an ls, and clearly the file is there. If i run the above script, the pwd command runs fine, as does the ls run fine. In fact I see blah.ver in the output of the ls - yet, the rm command does not delete the file.... if I remove the -f from the script, the rm command reports: rm: cannot remove '*.ver' No such file or directory However, if after the script is complete at the prompt I type rm -f *.ver It works as expected, and deletes the file - What am I missing here? Thanks - Mike |
Hi,
as it appears, the spawn command cannot interpret '*' as glob. Not sure if it can be made to work without providing the full name. [EDIT] Ok, Code:
here is one possibility: Hope this helps. |
All times are GMT -5. The time now is 04:04 PM. |