[rhn-users] syntax of my cronjob

Riley, Liz (ACHE) Liz.Riley at smiths-aerospace.com
Thu Sep 8 14:21:59 UTC 2005


Your command line

#/opt/app/cron/runjob.sh > /opt/app/cron/runjob.out |cat
/opt/app/cron/runjob.out | mail -s "Job Output" me at gmail.com

should have had a ; before the cat not  |

However, there are some options

1.  /opt/app/cron/runjob.sh | mail -s "Job Output" me at gmail.com

would do the same, but not write it to the disk, so you would never need
remove it

2. /opt/app/cron/runjob.sh | tee /opt/app/cron/runjob.out | mail -s "Job
Output" me at gmail.com

would also write it to the file as well as stdout so it could mail it.

---
Liz Riley



******************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege.  If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager.  Please do not copy it for any purpose, or disclose its contents to any other person.  The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company.  The recipient should check this e-mail and any attachments for the presence of viruses.  The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
******************************************




More information about the rhn-users mailing list