1,105,214 Community Members

Trap FTP success or failure

Member Avatar
nikita.
Light Poster
35 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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
Question Self-Answered as of 2 Years Ago
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: