IF Statements within an FTP Session
Good Afternoon Ladies & Gents. Is it possible to write a script that opens up a ftp session and then use ' if and for loops '. ie. ftp -n -i xxx. xxx. xxx. xxx <<EOF user username password binary if then echo FILE FOUND else echo FILE NOT FOUND ; fi ???????? Any input would be greatly appreciated.
Good Afternoon Ladies & Gents.
Is it possible to write a script that opens up a ftp session and then use ' if and for loops ' .
ie.
ftp -n -i xxx.xxx.xxx.xxx <<EOF
user username password
binary
if [ -f /home/bob/logs.doc ]
then echo FILE FOUND
else echo FILE NOT FOUND ;
fi
????????
Any input would be greatly appreciated.
Regard
Is it possible to write a script that opens up a ftp session and then use ' if and for loops ' .
ie.
ftp -n -i xxx.xxx.xxx.xxx <<EOF
user username password
binary
if [ -f /home/bob/logs.doc ]
then echo FILE FOUND
else echo FILE NOT FOUND ;
fi
????????
Any input would be greatly appreciated.
Regard
Participate on our website and join the conversation
This topic is archived. New comments cannot be posted and votes cannot be cast.