i am trying to parse the logs from SystemOut.log file and emailing it to my email address ,and i am not able to. Can anyone help me with this....
i tried creating this :
#!/bin/sh
echo " " > /SystemOut.log
for i in 2 3 4 5 6 7 8 9 10
do
shellscript1 -parameter >> /SystemOut.log
sleep 10
done
line=`cat /SystemOut.log | grep 'manik' | wc -l`
echo $line
if [ $line -eq 0 ]
then
echo " "| mail -s "That's the subject" email@email.com
else
cat SystemOut.log | grep 'manik' | mail -s "Did not match the pattern" email@email.com
fi
exit 0
Thank you in advance
edit by bakunin: please post your question to a new thread. Your question and the question of the thread owner have nothing to do with each other.
I am going to split your question to a new thread.