grep for something or something

Is there a way to grep for two words?

For example: grep invalid or failed in /var/log/auth.log

I can't seem to get anything to work.
LVL 5
bswinnertonAsked:
Who is Participating?
 
omarfaridCommented:
if you are not sure of case, then try

egrep -i "invalid|failed"  /var/log/auth.log
0
 
joolsCommented:
egrep "invalid|failed" /var/log/auth.log
0
 
bswinnertonAuthor Commented:
Perfect! Thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.