grep (possibly regex) question.
I have a text file with quite a few entries I want to delete out. I figured that using grep would be the best but unfortunately I cannot figure out how to get it to return lines without a search string....
For example if I want every line of a file that contained 2940 I would use grep "2940" file.txt But what I want is every line that DOESN'T contain 2940.... I found some information on a (?! ) operator but it doesn't seem to work... grep "(?!2940)" file.txt returns nothing..... :( Any ideas? |
-v flag in grep excludes the pattern you specified
|
All times are GMT -5. The time now is 03:04 AM. |