On 9 May 2009, at 11:41, Etaoin Shrdlu wrote:
...
Let's say we use BSD grep or Schilling grep or whatever - is there
actually any harm in exporting GREP_OPTIONS='--color=auto' in this
case?

Yes, because if the grep implementation in question supports GREP_OPTIONS
but doesn't support --color, you'll get errors when it's run.

(The assumption ... is that if --color is supported, then
GREP_OPTIONS is too, which is reasonable and is what happens for GNU
grep, although I cannot speak for other implementations).


So this keeps the .bashrc compatible with older versions of GNU grep. That hadn't occurred to me.

My question is:
Do BSD & other greps also support GREP_OPTIONS ?

Stroller.

Reply via email to