[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with a particular filtering task with grep
From: |
Eugene2 |
Subject: |
Help with a particular filtering task with grep |
Date: |
Tue, 31 Jul 2007 17:52:09 -0700 (PDT) |
Should be relatively simple to advanced users I presume...
I need to write a grep (either regular grep or egrep) statement that returns
all lines NOT matching a given string.
For example, I have the file "myfile" which contains the following lines:
FirstLine
SecondLine
ThirdLine
I need to run something like "grep <findEverythingNotIncluding*Second*>
myFile"
Which would return the following:
FirstLine
ThirdLine
But not return the line containing SecondLine. Of course the stuff in <> is
pseudocode instead of which I need the real expression to make it work.
If grep command syntax varies across platforms, I need something for Solaris
10's grep / egrep.
Thanks a lot.
--
View this message in context:
http://www.nabble.com/Help-with-a-particular-filtering-task-with-grep-tf4197366.html#a11937816
Sent from the Gnu - Grep mailing list archive at Nabble.com.
- Help with a particular filtering task with grep,
Eugene2 <=