Can't grep multiple strings

I have a script that periodically checks the Apache error_log to search for a specific error that causes it to hand and, if found, it restarts the service.

I recently found another error that forces it to hand and won't serve pages until it is reset. What I'm trying to do is to get the script to check for both strings and then to do the reset if found.

Here's what I have:

newest='grep -e "exit signal Segmentation fault (11)" -e "cgid daemon process died, restarting" $file|tail -4'

I tried to add the second string as follows:

newest='grep -e "exit signal Segmentation fault (11)\|cgid daemon process died, restarting" -e "cgid daemon process died, restarting" $file|tail -4'

The system only appears to be able to find which ever string is second and not do an either/or search like I am needing it to do.

Any help with pointing me in the right direction or helping me see what I'm blindly missing would be appreciated.

grep -E '(string1|string2)' file

Uising awk

sting1 or string2

awk '/string1|string2/' file

sting1 and string2

awk '/string1/ && /string2/' file

Thanks for the replies. I will test and let you know which one (or if both) work.