Hello All,
I am using the below code to grep particular word from file and then emailing it through mail command. the problem is this that when i run the script so it stops and ask me for the mail body then it asks for cc: and then runs.
I dont want to give body and cc: address, i just want that the script executes and email me and dont ask anything.
#/bin/ksh
/usr/bin/grep -q 'particular word' /home/danial/FILE.TXT
if [ $? -eq 0 ]
echo "particular word found "
mail -s 'found it' me@mymailaccount.com
fi
I hope you understand my requirement.
Regards,
Waqas Ahmed