K
Kimi
Hi,
I would like to know how to use 'Not' option while grepping using regex
I have a file "File1.txt" whose contents are as below
----
INFO: error did not occur
ERROR: an error has occured
INFO: the machine has been started
---
cat File1.txt | grep '\error' ----> returns both the lines which has
error
I would like to retrieve only the lines which has "error" but not
"Info"
I appreciate your help. Thanks in advance
Regards,
Fahad
I would like to know how to use 'Not' option while grepping using regex
I have a file "File1.txt" whose contents are as below
----
INFO: error did not occur
ERROR: an error has occured
INFO: the machine has been started
---
cat File1.txt | grep '\error' ----> returns both the lines which has
error
I would like to retrieve only the lines which has "error" but not
"Info"
I appreciate your help. Thanks in advance
Regards,
Fahad