script for reading logs of a script running on other UNIX server

Hi,

I have a script, running on some outside firwall server and it's log of success or failure is maintained in a file.

I want to write a script which ftp that server and reads that file and checks the logs and if failure , I will send mail notification.

Please let meknow if I am not clear at some point.

sftp user@hostname
password
start
cd ${target_directory}
cp result_file ${DESIRED_DIR}
end

something like this you want in your script?