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 -->
  #6 (permalink)  
Old 02-06-2007
funksen funksen is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2006
Location: Austria/Vienna
Posts: 430
if /tmp/file is not empty, which means an error occured, you get a mail, if not you get nothing - this can cause problems, because you don't know if the script didn't run at all

the wc -l is not needed, just wc works too, or you can just check if the file exists with "if [ -f /tmp/file ]; then ....