Trap FTP success or failure
Hi I have written the below code for ftp transfer. can u please help me how to trap whether it is successful or not.
ftp -n `awk '$1 ~ /db_server_IP/ { print $3 }' $CONFIG_FILE` <<END
quote USER `awk '$1 ~ /db_user/ { print $3 }' $CONFIG_FILE`
quote PASS `awk '$1 ~ /db_password/ { print $3 }' $CONFIG_FILE`
`awk '$1 ~ /db_file_mode/ { print $3 }' $CONFIG_FILE`
cd `awk '$1 ~ /db_file_path/ { print $3 }' $CONFIG_FILE`
get `awk '$1 ~ /db_file_name/ { print $3 }' $CONFIG_FILE`.tar.gz
quit
END
Related Article: Automate FTP session
is a solved Shell Scripting discussion thread by nikita. that has 5 replies, was last updated 1 year ago and has been tagged with the keywords: automate, ftp, login, password, session.
nikita.
Light Poster
35 posts since Sep 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Self-Answered as of 1 Year Ago