Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]RE: Mmmm...regular expressions. (was Re: Bash shell line continu
- To: tlug@example.com
- Subject: RE: Mmmm...regular expressions. (was Re: Bash shell line continu
- From: s-luppescu@example.com
- Date: Fri, 14 Sep 2001 09:07:41 -0500 (CDT)
- Content-Transfer-Encoding: 8bit
- Content-Type: text/plain; charset=us-ascii
- Delivered-To: tlug@example.com
- In-Reply-To: <20010914212218.A2864@example.com>
- List-Help: <mailto:tlug-request@example.comsubject=help>
- List-Post: <mailto:tlug@example.com>
- List-Subscribe: <mailto:tlug-request@example.comsubject=subscribe>
- List-Unsubscribe: <mailto:tlug-request@example.comsubject=unsubscribe>
- Old-Return-Path: <sl70@example.com>
- Organization: Univ of Chicago
- Reply-To: s-luppescu@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <rMKUTB.A.7zC.a7go7@example.com>
- Resent-Sender: tlug-request@example.com
- Sender: sl70@example.com
On 14-Sep-2001 Shimpei Yamashita wrote: > On Fri, Sep 14, 2001 at 11:49:56AM +0900, brettr wrote: >> grep -vi \.gif ex010905.log | grep -vi \.jpg | grep -vi \.jpeg | / >> grep -vi 'googleboot |openfind > summary.log > > I think you meant to say > > grep -vi '\.gif' .... > > or > > grep -vi \\.gif .... > > Shells eat unquoted or unescaped backslashes, so grep will only see > .gif in your example. > > You may also want to use '\.gif\b' instead of '\.gif' -- that way, the > expression will only match .gif at the end of a word, and you won't > drop lines containing words like big.gift.html on the floor. (If you > aren't running Linux, you may have to use egrep instead of grep to get > this feature.) Regular expressions are by no means within my area of expertise, but wouldn't it be more efficient to do something like: grep -vi '\.gif\b|\.jpg\b|\.jpeg\b|googleboot' ex010905.log|openfind > \ summary.log It seems I can never get these alternation patterns correct. Perhaps someone can correct this for me. ______________________________________________________________________ Stuart Luppescu -=-=- University of Chicago $(B:MJ8$HCRF`H~$NIc(B -=-=- s-luppescu@example.com http://www.consortium-chicago.org/people/sl.html http://musuko.uchicago.edu/pubkey.asc for PGP Public Key ICQ #21172047 AIM: psycho7070 When a woman gives me a present I have always two surprises: first is the present, and afterward, having to pay for it. -- Donnay >> Sent on 14-Sep-2001 at 09:00:59 with xfmail
- Follow-Ups:
- RE: Mmmm...regular expressions. (was Re: Bash shell line continu
- From: "Stephen J. Turnbull" <turnbull@example.com>
- References:
- Mmmm...regular expressions. (was Re: Bash shell line continuation)
- From: Shimpei Yamashita <shimpei@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: Printing PostScript
- Next by Date: Increased Cyber Awareness
- Prev by thread: Mmmm...regular expressions. (was Re: Bash shell line continuation)
- Next by thread: RE: Mmmm...regular expressions. (was Re: Bash shell line continu
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links