Command syntax question for grep
Hi there --
I am running a script that includes the following grep statement: Code:
grep -v ' OK' clamscan_output.txt > /tmp/clamscan_outputsummary.txt How can this be done? Thanks. |
Code:
grep -v ' OK' clamscan_output.txt | grep -v 'Empty file' > /tmp/clamscan_outputsummary.txt |
You can do it by specifying your expressions with the -e option like:
Code:
grep -v -e ' OK' -e 'Empty file' clamscan_output.txt > /tmp/clamscan_outputsummary.txt Forrest |
I tried the syntax you suggested, and it worked. Thanks for the help.
|
or use egrep and the or | operator.
egrep -v ' OK|Empty file' clamscan_output.txt |
All times are GMT -5. The time now is 04:05 AM. |