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] grep sort of thing
- Date: Thu, 12 Jun 2003 19:06:49 +0900
- From: Stephen Lee <sl@example.com>
- Subject: Re: [tlug] grep sort of thing
- References: <1055373247.9865.23.camel@example.com> <20030611161427.5655.B-ROBSON@example.com>
Brett Robson <b-robson@example.com> wrote: > > > > > > > > I want to display strings from a text file(s) based on a reg exp, sort > > > > of like egrep but only displaying the matched string not the whole line > > > > from the file. > > No, the search expression is a regular expression so it may be different > each match, in this case it /will/ be different each time. > > I think Bruce's idea is the better than anything I've come up with. Yes, but you don't need grep for that. This only matches 1 pattern each line though. sed -n 's/^.*\(regexp\).*$/\1/p' file Stephen
- References:
- Re: [tlug] grep sort of thing
- From: David Blomberg
- Re: [tlug] grep sort of thing
- From: Brett Robson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] im-ja v0.5
- Next by Date: Re: [tlug] im-ja v0.5
- Previous by thread: Re: [tlug] grep sort of thing
- Next by thread: [tlug] im-ja v0.5
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links