Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 'if echo hello' in .bashrc
Date: Sat, 09 May 2009 10:43:27
Message-Id: 690D7319-77E2-42B2-9D15-93EB6E937E18@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] 'if echo hello' in .bashrc by Etaoin Shrdlu
1 On 9 May 2009, at 11:41, Etaoin Shrdlu wrote:
2 >> ...
3 >> Let's say we use BSD grep or Schilling grep or whatever - is there
4 >> actually any harm in exporting GREP_OPTIONS='--color=auto' in this
5 >> case?
6 >
7 > Yes, because if the grep implementation in question supports
8 > GREP_OPTIONS
9 > but doesn't support --color, you'll get errors when it's run.
10 >
11 > (The assumption ... is that if --color is supported, then
12 > GREP_OPTIONS is too, which is reasonable and is what happens for GNU
13 > grep, although I cannot speak for other implementations).
14
15
16 So this keeps the .bashrc compatible with older versions of GNU grep.
17 That hadn't occurred to me.
18
19 My question is:
20 Do BSD & other greps also support GREP_OPTIONS ?
21
22 Stroller.

Replies

Subject Author
Re: [gentoo-user] 'if echo hello' in .bashrc Etaoin Shrdlu <shrdlu@×××××××××××××.org>