Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] pattern matching
- Date: Thu, 12 Feb 2004 17:32:50 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] pattern matching
- References: <20040212164225.FFDF.B-ROBSON@example.com>
- Organization: The XEmacs Project
- User-agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.5 (celeriac, linux)
>>>>> "Brett" == Brett Robson <b-robson@example.com> writes: Brett> I want to grep for a pattern but I don't want to see the Brett> whole line, just the bit that matches. Sometimes I pipe to Brett> cut but in this case I don't know where the pattern will Brett> be. Surely this is straight forward? grep -e 'PATTERN' | sed -e 's/.*\(PATTERN\).*/\1/' perl -ane 'print "$&\n" if /PATTERN/' There must be a way of doing this using awk, but I can't remember it. -- Institute of Policy and Planning Sciences http://turnbull.sk.tsukuba.ac.jp University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN Ask not how you can "do" free software business; ask what your business can "do for" free software.
- Follow-Ups:
- Re: [tlug] pattern matching
- From: roy lo
- References:
- [tlug] pattern matching
- From: Brett Robson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Enterprise Linux Support
- Next by Date: Re: [tlug] pattern matching
- Previous by thread: [tlug] GettingPastThings(2)
- Next by thread: Re: [tlug] pattern matching
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links