charmingcann
Programmer
I have this shell script that gets a file from a particular server :
HOST_IP=111.111.111.11
E_DEST=$SAMPLE_TOP/in
E_USERID='mis'
cd $E_DEST
ftp -n -v -i << EOF
open $FTP_HOST_IP
user $FTP_USERID
ascii
lcd $E_DEST
get file1
bye
EOF
I need to check whether the file is existing or not. If not, a message will be printed "file not found" and then exit from the script.
Thanks
HOST_IP=111.111.111.11
E_DEST=$SAMPLE_TOP/in
E_USERID='mis'
cd $E_DEST
ftp -n -v -i << EOF
open $FTP_HOST_IP
user $FTP_USERID
ascii
lcd $E_DEST
get file1
bye
EOF
I need to check whether the file is existing or not. If not, a message will be printed "file not found" and then exit from the script.
Thanks