I've a code which 'grep' certain strings from two files which I've defined as variables and if those strings are found then it'll send me the last 10 lines of the files using
tail. I want the strings in my output mail in green color format. Is this anyway possible?
Below is my code:
grep "xyz" $File2 if [ $? -eq 0 ] then echo "Process finished, Below are the logs : \n `tail $File2` |mailx -s "Logs" firstname.lastname@example.org else exit 1 fi