[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-grep] Re: Possible grep bug

From: Stepan Kasal
Subject: [bug-grep] Re: Possible grep bug
Date: Thu, 26 May 2005 10:00:01 +0200
User-agent: Mutt/1.4.1i

  thenk you for the report.

On Wed, May 25, 2005 at 01:41:01PM +0200, Sandro Bosio wrote:
> That is probably because first -v is applied and then -A 1 extends the 
> non-matching,

exactly, this is the bahaviour.  grep is also an interactive tool.
You want to see all lines containig foo.  -A shows you the context.

If you have a file where most lines start with `:', then
        grep -v '^:' file
shows you lines which don't start with `:'.
And -A shows you the context, ie. the syrrounding `:' lines.

The manpage explains -A that some lines after the ``matching'' ones are
printed, too.  Perhaps it would be more exact to use the word
``selected'' lines.

Have a nice day,
        Stepan Kasal

reply via email to

[Prev in Thread] Current Thread [Next in Thread]