SPUG: Any grep's lack \b functionality?

Cantrall, Christopher W christopher.w.cantrall at boeing.com
Mon Oct 6 12:54:39 CDT 2003


Tim wrote:
> I take it you're saying that grep and egrep are missing \< and \b?  
> AFAIK, that means your AIX isn't "UNIX98 compliant".  Hmm...

I couldn't find those meta-characters in the man page, and they didn't do anything in my command line tests, so I guess I am saying that AIX 4.3 (as Boeing installs it) is missing any word-boundary metacharacter I'm familiar with.  The greps I've referenced all had the standard Files listed at the end of the man page, and didn't have any of the usual Boeing disclaimers I've seen with our more custom stuff.  

OTOH, our Perl install is "version 5.005_03 built for aix-thread", so we might not have the latest versions of anything.

> > Boeing's install of AIX 4.3 has grep, egrep, fgrep, and ogrep.
> > ogrep has no man page, but the usage is similar to other greps.
> 
> Sounds like an "old" grep; if sufficiently old, it mighit not 
> even have -i.

Here's the output of "ogrep" at the command line:

Usage: ogrep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...
        [-f pattern_file...] [file...]
Usage: ogrep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] [-e pattern_list...]
        -f pattern_file... [file...]
Usage: ogrep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] pattern_list [file...]



HTH.

____________________________________________
Chris Cantrall
Structural Engineer, 777 Fuselage, Boeing
Christopher.W.Cantrall at Boeing.com
chris at cantrall.org
http://perlmonks.org/index.pl?node=Louis_Wu


> -----Original Message-----
> From: Tim Maher/CONSULTIX [mailto:tim at teachmeperl.com]
> Sent: Monday, October 06, 2003 10:00 AM
> To: Cantrall, Christopher W
> Cc: Tim Maher; spug-list at pm.org
> Subject: Re: SPUG: Any grep's lack \b functionality?
> 
> 
> On Mon, Oct 06, 2003 at 08:18:45AM -0700, Cantrall, 
> Christopher W wrote:
> > Boeing's install of AIX 4.3 has grep, egrep, fgrep, and ogrep.
> > ogrep has no man page, but the usage is similar to other greps.
> 
> Sounds like an "old" grep; if sufficiently old, it mighit not 
> even have -i.
> 
> > fgrep has a "-w" word search flag, but there appears to be no
> > true word boundary functionality. So on this AIX, there is no
> > \b available.
> 
> I take it you're saying that grep and egrep are missing \< and \b?  
> AFAIK, that means your AIX isn't "UNIX98 compliant".  Hmm...
> 
> Tim
> > 
> > Good luck with the book.
> 
> Thanks!
> 
> > 
> > ____________________________________________
> > Chris Cantrall
> > Structural Engineer, 777 Fuselage, Boeing
> > Christopher.W.Cantrall at Boeing.com
> > chris at cantrall.org
> > http://perlmonks.org/index.pl?node=Louis_Wu
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Tim Maher [mailto:tim at consultix-inc.com]
> > Sent: Sunday, October 05, 2003 10:53 AM
> > To: spug-list at pm.org
> > Subject: SPUG: Any grep's lack \b functionality?
> > 
> >    [snip]
> > 
> > So one question I'd like help answering is:
> > 
> > 1) Is any fairly contemporary version of UNIX missing a grep,
> >    egrep, or sed that supports a word boundary metacharacter?
> >    (\b, \<, whatever)
> > 
> > But the more general question that really interests me is:
> > 
> > 2) Does anybody know where I can find a detailed list of the
> >    capabilities of each of the UNIX utilities (grep, sed, sort,
> >    tail, etc.) as they're provided by different Unices?
> > 
> > TIA,
> > 
> > -Tim
> > *------------------------------------------------------------*
> > | Tim Maher (206) 781-UNIX  (866) DOC-PERL  (866) DOC-UNIX   |
> > | tim(AT)Consultix-Inc.Com  TeachMeUnix.Com  TeachMePerl.Com |
> > *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
> > |  Watch for my Book: "Minimal Perl for Shell Programmers"   |
> > *------------------------------------------------------------*
> 
> -- 
> 
> -Tim
> *------------------------------------------------------------*
> | Tim Maher (206) 781-UNIX  (866) DOC-PERL  (866) DOC-UNIX   |
> | tim(AT)Consultix-Inc.Com  TeachMeUnix.Com  TeachMePerl.Com |
> *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
> |  Watch for my Book: "Minimal Perl for Shell Programmers"   |
> *------------------------------------------------------------*
> 



More information about the spug-list mailing list