Re: Grep for strings NOT matching
From: GreyBeard (Fuzzy.GreyBeard_at_gmail.com)
Date: 01/06/05
- Next message: tim wunder: "Re: Grep for strings NOT matching"
- Previous message: Chris McDonald: "Re: Grep for strings NOT matching"
- In reply to: Shabam: "Grep for strings NOT matching"
- Next in thread: tim wunder: "Re: Grep for strings NOT matching"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 06 Jan 2005 20:20:21 GMT
On Thu, 06 Jan 2005 11:51:47 -0800, Shabam wrote:
> I've been doing this:
>
> cat filename|grep "hello"
>
> Where it returns only results with the string "hello" in it. However, I
> want to return results where there are NO strings matching "bye". How do I
> do that?
According to "man grep", the -v option is to 'inVert the sense'.
You might try
cat filename | grep -v "bye"
or grep -v bye *
hth/FGB
- Next message: tim wunder: "Re: Grep for strings NOT matching"
- Previous message: Chris McDonald: "Re: Grep for strings NOT matching"
- In reply to: Shabam: "Grep for strings NOT matching"
- Next in thread: tim wunder: "Re: Grep for strings NOT matching"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]