Possible Duplicate:
Regex for “or” in grep
How can I grep for lines with either 'disable' or 'enable' in my file?
I tried $ grep "disable|enable" fail.log
but that shows up nothing.
How can I grep for lines with either 'disable' or 'enable' in my file? I tried $ grep "disable|enable" fail.log but that shows up nothing. |
|||
|
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
|
You need the Try:
Without it, |
||||
|
|
|
Try "grep "disable\|enable" fail.log The backslash turns the | into the "or" metacharacter, otherwise you are grepping for the literal 'disable|enable" |
|||
|
|