I have written a bash shell script that
uses FTP to get some files from a remote machine.
Is it possible to check result of each command in some way?
I there's an login failure or if the file transfer/connection is interupted I want to write that error information to a file.
The FTP part looks like this;
ftp -n -i <<-EXIT
open $REMOTE_HOST
user $REMOTE_USER $REMOTE_PASSWORD
cd $REMOTE_DIR
mget *.rdy
bye
EXIT
Any suggestions on this?
uses FTP to get some files from a remote machine.
Is it possible to check result of each command in some way?
I there's an login failure or if the file transfer/connection is interupted I want to write that error information to a file.
The FTP part looks like this;
ftp -n -i <<-EXIT
open $REMOTE_HOST
user $REMOTE_USER $REMOTE_PASSWORD
cd $REMOTE_DIR
mget *.rdy
bye
EXIT
Any suggestions on this?