bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Tr: Problem with grep v2.5.1


From: Paul Jarc
Subject: Re: Tr: Problem with grep v2.5.1
Date: Fri, 18 May 2007 16:47:28 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

Simon Nieux <address@hidden> wrote:
>>     grep -B 3 "\.\.\.[0-9]\{3\}" wget.log | grep -v -B 3 "\.\.\.200"

That means that th second grep will print every line that doesn't
match "\.\.\.200", and the three lines preceding each of those lines.
To get what you want using grep, you'd need a different pattern in
place of "\.\.\.[0-9]\{3\}" that inherently excludes "...200" without
using -v:
grep -E -B 3 '\.\.\.([013-9][0-9]{2}|2[1-9][0-9]|20[1-9])'


paul




reply via email to

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