Hi again. I have it fixed..... sorry for the hassles, I should sometimes investigate further before asking for help..... The solution is: with the <<MARK, "!" in the ftp doesn't drop back to a shell (Perhaps a bug?), but what I did do was: ! (commands) on the one line which does work.
Just for the archives, and anyone's interest the script ended up being: -------------------------------------------------------------------------- ftp -i -n <<MARK # Connect to the server open server user name password bin prompt # Lets check if the file exists, and drop the contents of ls to the local # machine as ftpdir.txt mdir PPSMDISP.GPS ftpdir.txt # Dropping back to a shell to check is the file has any size to it # If it doesn't, do nothing, if it does move the file to another extension # and emailing a warning ! if [ -s ftpdir.txt ] ; then mv PPSMDISP.GPS PPSMDISP.WAIT \ && mail -s "Couldn't send dispatch" email addy # Sending all .GPS files to server mput *.GPS bye MARK -------------------------------------------------------------------------- Thanks all Scott -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
