Subject: Re: A grep question
To: None <netbsd-help@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-help
Date: 06/08/2001 15:24:14
In article <457.559T256T10192496geohei9@attglobal.net>,
Georges Heinesch <geohei-ml@geohei.lu> wrote:
>Hi.
>
>Possibly off-topic, but someone here should know the answer.
>
>Which grep (or egrep, fgrep) options do I have to use to extract all
>lines from a file except a lines containing a given string.
>
> # grep "list all lines except" 'foobar'
>
% grep -v 'foobar'
"man grep" works too.
-v, --invert-match
Invert the sense of matching, to select non-matching lines.
christos