Results 1 to 2 of 2
Hi,
I have one log file in which I get the no. of failed process.
I need a script to find out the variable count and send us mail through ...
- 05-18-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 1
Script to find the variable count
Hi,
I have one log file in which I get the no. of failed process.
I need a script to find out the variable count and send us mail through mail command.
I need this alert mail only, if the variable count increases by 10
Variable in the log file test.log is.....
Commands returned without processing frame(s) = 597
Can someone help me please?
Regards,
Nagu
- 05-18-2009 #2Just Joined!
- Join Date
- May 2009
- Posts
- 4
someVar=$((`awk '{ print $1 }' somelog.log`))
if [ $someVar -gt 10 ]
then
`mutt -s "Failed processes" someuser@somedomain.net -c anotherreceiver@somedomain.com<sendreport`
echo "Variable count greater than 10";
fi
NB://somelog.log contains the number of failed processes. sendreport contains the body of the mail
If I didnt get your question clear you can try and explain it better. I'll help where I can.


Reply With Quote