Hi Friends/Team,
I have written a small script but I dont understand what is the mistake in this one.. please help me identify and correct it.
file="touch `date +%b_%d`"
for i in $(cat /home/gmanju/servers)
do
echo $i >>file
remsh $i cat /var/opt/omni/server/log/opcmsg.log | grep -i "`date +%b` `date +%d`" | wc -l >>file
done
My requirement is like create a file everyday with preseent date and thereby the out put of my script should go to the created file. so that I can add this script in the cron job to execute everyday.
Please help!!!!