[illumos-Developer] webrev: 650 grep support for -q would be useful

Yuri Pankov yuri.pankov at gmail.com
Thu May 5 11:14:48 PDT 2011


On Thu, May 05, 2011 at 02:05:24PM -0400, Richard Lowe wrote:
> > At least one grep invocation in usr/src/tools/scripts/nightly.sh has to
> > be changed - the one with '|%WHOANDWHERE|', either escape |'s or don't
> > use egrep (just grep should do fine there, not sure why egrep was used
> > everywhere in that file).
> 
> I did some digging for Yuri, and the only '%WHOANDWHERE%' I could find
> is the Version strings in libldap4.  My only guess was that we used to
> expand the %...% sections and needed to keep the pattern strings out
> of the noise.  It's just a guess though.
> 
> > A diff for nightly.sh with a lot more changes
> > making sure we call just `grep` while we are here:
> >
> > https://www.xvoid.org/illumos/stuff/nightly.sh.diff
> >
> 
> It seems like using 'grep -E' in these diffs as you do would cause
> problems for people using nightly but not yet having your grep changes
> installed on their build machine.  You need to keep using 'egrep' in
> those cases for a while (note that nightly forces a $PATH such that
> /usr/bin precedes the other directories containing grep commands).

Doh, you are correct, of course. The reason for this was that
http://pubs.opengroup.org/onlinepubs/009695399/utilities/grep.html
suggests (read between the lines :-) that egrep and fgrep are there only
for "historical reasons", and latest GNU grep has the following:
"Direct invocation as either `egrep' or `fgrep' is deprecated."


Yuri



More information about the Developer mailing list