Please review error routines in my ksh script

view full story

http://www.unix.com – The script distributes files from an AIX server using iether ftp or sftp depending on the constraint of the destination server. I am interested in having the error checking routine critically reviewed. I will only include an excerpt from the script concerning error trapping: (where $FTP_OUT is the log captured for either an "ftp" or an "sfpt" transfer) Check_for_errors() { set -x RESULT=`egrep -c "not found|No such|refused|failed|error|timed out|not exist|denied|Connection closed|STOR fails|not authorized|timeout|Not connected" $FTP_OUT` if [ (HowTos)