LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Exclude certain patterns from grep? (https://www.linuxquestions.org/questions/linux-general-1/exclude-certain-patterns-from-grep-436287/)

kinetik 04-18-2006 03:21 AM

Exclude certain patterns from grep?
 
Hi all


I know how to narrow down results from grep to certain patterns, but how do I exclude certain results containing specific words?

I tried -R --exclude="word to exclude"

It doesn't work... :(

jschiwal 04-18-2006 03:57 AM

grep -vw '<word regex to exclude>' file

kinetik 04-18-2006 04:13 AM

JSchiwal, remind me to buy you a six-pack some day. Thanks for helping me out once again, it's appreciated. :)

jschiwal 04-23-2006 06:30 AM

Your sig reminded me about something. Fuji film named Fargo the least photogenic city in the world.

kinetik 04-24-2006 05:37 AM

Well, too bad Fuji film cant take pictures of Fargo's residents' personalities, because if your fellow Fargo inhabitants have anything near as helpful a demeanor as you, I'm pretty sure Fargo has the nicest people on earth!


All times are GMT -5. The time now is 04:01 AM.