The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-07-2008
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,382
Quote:
Originally Posted by openspark View Post
Hi,

This is part of a ftp script, Can someone please explain what is its functionality or the basic idea behind it and please throw some light on the inv & tee function marked in red.

echo "bye" ) | ftp -inv | tee -a ${DOWNLOAD_LOG} | awk '{ print $0 } /^5[0-9[0-9].*/ { print "\n\t\t\tFTP session had some errors" }' | awk '/^2[0-9][0-9][- ]You.*/ { print "\n\t\t\t"substr($0,5) }'


Thanks
Sparks
i think there are few more echo statements before echo "bye"
all that are piped to ftp command in ftp -i -n -v are option gothrough the man page of ftp. and the o/p of ftp is appended to the logfile tee -a will append to the exsisting file then log file is checked for any error in ftp..