IN a file I need to check for 3 patterns if all the 3 patterns are in the file. I need to send out an email. All this needs to be done in korn shell script. Please advise.
Very cheap, but:
if grep "PAT1" $FILE | grep "PAT2" | grep -q "PAT3"; then
echo "found all 3 patterns"
fi