PDA

View Full Version : Shell Scriping



biggsk
19th December 2007, 01:32 AM
Ok heres it is. I've got a shell script, I've got it setup to run daily with a cron job.
What do I need to put in the top, and bottom part of the script to that when I check the message.log I can see that it ran?

Thanks for the help :)

axelilly
19th December 2007, 01:38 AM
What is message.log?
Do you mean /var/log/messages ?

biggsk
19th December 2007, 01:55 AM
What is message.log?
Do you mean /var/log/messages ?
oops...yeah that is what I meant.

axelilly
19th December 2007, 01:59 AM
Oh, ok.

In that case use logger

Example:
logger -t DAILYSCRIPT 'DailyScript ran!'

This will put that line in the /var/log/messages file.

biggsk
19th December 2007, 02:11 AM
Awesome!! Worked perfectly.
Thanks!!