I am writing an expect program which tests FTP security from file system ACLs. It is ran from a RedHat 9.0 machine. I need to do all preparation in the same expect program which tests FTP. The expect program first deletes all the files\dirs of a mounted dir and then copies over files and dirs which will later be tested against FTP.
On the preparation portion I am trying to run the line "exec /bin/rm -fR /mnt/servershare/*". However when this line runs it always errors out with the message "/bin/rm: cannot lstat '/mnt/servershare/*': No such file or directory". However the line "exec /bin/rm -f /mnt/servershare/filename" works just fine. Another note is that I can run "/bin/rm -fR /mnt/servershare/*" from the shell console and have no problems, nonetheless I will get the same message in the shell if no files exist in the directory I am deleting everything from.
I am thinking that expect is treating the asterix as a file name and not a wildcard. Anyone know how to solve my problem? I am using tcl-8.3.5-88 with expect 5.38.0.
On the preparation portion I am trying to run the line "exec /bin/rm -fR /mnt/servershare/*". However when this line runs it always errors out with the message "/bin/rm: cannot lstat '/mnt/servershare/*': No such file or directory". However the line "exec /bin/rm -f /mnt/servershare/filename" works just fine. Another note is that I can run "/bin/rm -fR /mnt/servershare/*" from the shell console and have no problems, nonetheless I will get the same message in the shell if no files exist in the directory I am deleting everything from.
I am thinking that expect is treating the asterix as a file name and not a wildcard. Anyone know how to solve my problem? I am using tcl-8.3.5-88 with expect 5.38.0.