grep, etc
Bob Stockler
bob at trebor.iglou.com
Wed Aug 18 09:25:04 PDT 2004
On Wed, Aug 18, 2004 at 11:56:55AM -0400, Mark Luljak wrote:
| On Wed, Aug 18, 2004 at 11:38:48AM -0400, Jay Ashworth may or may not have
| proven themselves an utter git by pronouncing:
| > On Wed, Aug 18, 2004 at 01:17:23AM -0400, Brian K. White wrote:
| > > Jay R. Ashworth wrote:
| > > > On Tue, Aug 17, 2004 at 11:08:11PM -0400, Brian K. White wrote:
| > > >> Fairlight wrote:
| > > >>> Sweet. I should grab that. :) Basically a -useful- egrep. :)
| > > >>> Well, egrep is useful, but not as useful as it otherwise could be.
| > > >>
| > > >> I'd say the plain old stock sco grep was useful, since it aswered
| > > >> the need very directly in one command without especially exotic
| > > >> options or a pipeline. Didn't even require the stock egrep let alone
| > > >> gnu grep or pcregrep.
| > > >
| > > > Well, except that it *didn't* fulfill the requirement of the poster
| > > > who started this thread, without a big ungainly pipline wrapped
| > > > around it.
| > >
| > > What are you talking about?
| > >
| > > The stated request was:
| > >
| > > sample data:
| > > ISA*00000089** *
| > > CLM*inv123456*a*b*c -213
| > > SV1*23456*25*A*B -214
| > >
| > > I want to be able to view a range of lines, ie: from -213 to -216
| > >
| > > In what way does this fail to meet that request?
| > > grep '-21[3-6]$' file
| >
| > Well, in the *exact* instance he used as an example, it would work.
| >
| > But what happens if he wants -213 through -226?
| >
| > There isn't actually, quite enough information about his requirements
| > here to design a solution that's guaranteed to work.
|
| Amen. Which is why we ended up with anything from my pipeline (I was
| unaware you could combine funtionalities like you did, Jay) to accomplish a
| match and a range, to people just doing the range. I think we all took a
| little something different away from it, depending how we read it.
If you're talking about your head - tail pipeline, it would
never have worked because you assumed the -213 and the -216
were line numbers, where they were really the final fields
in lines.
Bob
--
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list