The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
How do I prevent cron from returning errors on a file not found?
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
How do I prevent cron from returning errors on a file not found?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
02-05-2007
funksen
Registered User
Join Date: Nov 2006
Location: Austria/Vienna
Posts: 431
2> /tmp/file
var=$(wc -l /tmp/file)
if [ $var -gt 0 ]; then cat /tmp/file | mail -s "copy job error"
your@e.mail
; rm /tmp/file; fi
or generate an error log with timestamps
funksen
View Public Profile
Visit funksen's homepage!
Find all posts by funksen
Find funksen's past nominations received
Find funksen's present nominations given