nikita. 0 Newbie Poster

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.