IF Statements within an FTP Session
This is a discussion about IF Statements within an FTP Session in the Everything Linux category; 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 in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Jan 12
Jan 16
0
<1 minute
Responses to this topic
OP
Any input ?