Results 1 to 3 of 3
This is not for school. At my job I was trying to automate something that we as operators do everyday. I am not a scripter, but certainly want to learn ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-27-2012 #1Just Joined!
- Join Date
- Oct 2012
- Posts
- 15
Would like to automate something at work, but dont know where to begin
This is not for school. At my job I was trying to automate something that we as operators do everyday. I am not a scripter, but certainly want to learn shell scripting. A task we do daily below:
We have to check the system.log when there is a message and send it off to the Admin.
1. loginto the operacct
2. cd /Admin/monitor
3. more system.log. If there is something in the file send email to Admin with contents, and then run script
./logremove.sh
4. If nothing is is the log then of course quit out.
Its just something i've been thinking about automating but, don't know where to begin.
- 11-28-2012 #2Linux Newbie
- Join Date
- Nov 2012
- Posts
- 136
test -s returns success if file is not empty.
- 11-28-2012 #3Just Joined!
- Join Date
- Oct 2012
- Posts
- 15
Thanks watael.
I was hoping for template of how to start the script, as I am not a scripter. How would I incorporate sending the email to the Admins. Could someone give me a rough draft or template, if its not too much trouble


Reply With Quote
