bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dependency on $PATH in egrep


From: Wolf, Sven
Subject: dependency on $PATH in egrep
Date: Wed, 6 Mar 2013 19:44:22 +0000

Hello, GNU,

I have an observation for you.  I'd call it a complaint except that our 
installation may be old/customized and there may be issues I'm not considering 
here.

One implementation of egrep on Solaris machines at my company is a shell script 
(it happens to be installed at /package/grep/bin/egrep.  There is a soft link 
to it at /usr/local/bin/egrep.  The former has a timestamp of 2005-05-20.  
/package/grep/bin/grep appears to be GNU's grep.)  The egrep implementation is:
#!/bin/sh
exec grep -E ${1+"$@"}

This has a dependency on $PATH in that grep is called without an explicit path. 
 If this implementation is your doing (/package/grep/bin/grep has the same 
timestamp and is from GNU) and can be fixed, please do.  If it's already fixed, 
thanks.

This dependency bit me in that a call to egrep from my own shell script with an 
explicit path nevertheless failed when called from a cron job because the 
script delegated to /usr/bin/grep, which lacks the -E option.

Cheers,
Sven Wolf


THIS MESSAGE AND ANY ATTACHMENTS ARE CONFIDENTIAL, PROPRIETARY, AND MAY BE 
PRIVILEGED.  If this message was misdirected, BlackRock, Inc. and its 
subsidiaries, ("BlackRock") does not waive any confidentiality or privilege.  
If you are not the intended recipient, please notify us immediately and destroy 
the message without disclosing its contents to anyone.  Any distribution, use 
or copying of this e-mail or the information it contains by other than an 
intended recipient is unauthorized.  The views and opinions expressed in this 
e-mail message are the author's own and may not reflect the views and opinions 
of BlackRock, unless the author is authorized by BlackRock to express such 
views or opinions on its behalf.  All email sent to or from this address is 
subject to electronic storage and review by BlackRock.  Although BlackRock 
operates anti-virus programs, it does not accept responsibility for any damage 
whatsoever caused by viruses being passed.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]