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: Wed, 11 Jun 2003 17:10:38 +0900
- From: Brett Robson <b-robson@example.com>
- Subject: Re: [tlug] grep sort of thing
- References: <20030611145708.5653.B-ROBSON@example.com>
> > 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. For what it is worth here is my solution which is now on the path as 'filter'. it reads from stdin. I guess I could check to see if a file arg was handed and then read from that file but this is fine. #!/bin/bash /usr/bin/perl -ne 'print $&, "\n" if /'$1'/;' Thanks everyone Brett
- References:
- [tlug] grep sort of thing
- From: Brett Robson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] grep sort of thing
- Next by Date: [tlug] im-ja v0.5
- Previous by thread: Re: [tlug] grep sort of thing
- Next by thread: Re: [tlug] grep sort of thing
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links