On 8 May 2009, at 14:38, Stroller wrote:
...
if echo hello|grep --color=auto l /dev/null 21; then
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
fi
I'm afraid this thread has run away from me. I'm drinking the day's
first cup of tea rubbing my eyes furiously in confusion. Wha?
On Saturday 9 May 2009, 12:15, Stroller wrote:
On 8 May 2009, at 14:38, Stroller wrote:
...
if echo hello|grep --color=auto l /dev/null 21; then
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
fi
I'm afraid this thread has run away from me. I'm drinking the day's
first cup of
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
On Saturday 9 May 2009, 12:43, Stroller wrote:
My question is:
Do BSD other greps also support GREP_OPTIONS ?
A quick google search reveals that NetBSD and FreeBSD use GNU grep, while
OpenBSD uses BSD grep, which (at least according to the man page - see
http://tinyurl.com/cs2unf) does not
On Sat, 9 May 2009 11:15:30 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
Presumably BSD grep all other greps also support the GREP_OPTIONS
environment variable?
If it doesn't have support for the var then there should be no reason
to pollute environment by setting it, possibly
Etaoin Shrdlu shr...@unlimitedmail.org wrote:
On Saturday 9 May 2009, 12:15, Stroller wrote:
On 8 May 2009, at 14:38, Stroller wrote:
...
if echo hello|grep --color=auto l /dev/null 21; then
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
fi
I'm afraid this thread has
Hi there,
I've just realised that grep hasn't been highlighting results in
colour, and it occurred to me that I was sure it has supported this
facility for some time. Thus I discovered the --colour=always flag to
grep and trying to make this permanent I stumbled upon this site:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need to scroll down about
halfway through that page to Colorize grep; the author advises adding:
if echo hello|grep --color=auto l /dev/null 21; then
export
On 8 May 2009, at 15:01, Mike Kazantsev wrote:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need to scroll down about
halfway through that page to Colorize grep; the author advises
adding:
if echo hello|grep
On Friday 08 May 2009 16:01:14 Mike Kazantsev wrote:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need to scroll down about
halfway through that page to Colorize grep; the author advises adding:
if echo
Hi Alan,
Am Freitag, 8. Mai 2009 schrieb Alan McKinnon:
Some greps (like BSD one) might not support '--color' option, so echo
hello|grep --color=auto l will return error code, skipping if clause,
and won't break grep operation by adding an unsupported option.
is this really right?
The
On Friday 08 May 2009 16:38:30 Christian wrote:
Hi Alan,
Am Freitag, 8. Mai 2009 schrieb Alan McKinnon:
Some greps (like BSD one) might not support '--color' option, so echo
hello|grep --color=auto l will return error code, skipping if clause,
and won't break grep operation by adding
On Friday 8 May 2009, 16:10, Alan McKinnon wrote:
On Friday 08 May 2009 16:01:14 Mike Kazantsev wrote:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need to scroll down about
halfway through that page to
On Friday 08 May 2009 16:59:19 Etaoin Shrdlu wrote:
On Friday 8 May 2009, 16:10, Alan McKinnon wrote:
On Friday 08 May 2009 16:01:14 Mike Kazantsev wrote:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need
On 08.05.2009 17:10, Alan McKinnon wrote:
if echo hello|grep --color=auto l /dev/null 21; then
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
fi
to ~/.bashrc
Why does he echo hello, please?
Some greps (like BSD one) might not support '--color' option, so echo
hello|grep
On Friday 8 May 2009, 16:51, Alan McKinnon wrote:
except that STDERR is combined with STDOUT and sent to /dev/null
so the script will never get it, the if is always true and the
entire check is redundant. Better would be
if echo hello|grep --color=auto l /dev/null ; then
That
Alan McKinnon wrote:
On Friday 08 May 2009 16:01:14 Mike Kazantsev wrote:
On Fri, 8 May 2009 14:38:58 +0100
Stroller strol...@stellar.eclipse.co.uk wrote:
To find the part to which I refer you'll need to scroll down about
halfway through that page to Colorize grep; the author advises adding:
On Fri, 8 May 2009 16:10:20 +0200
Alan McKinnon alan.mckin...@gmail.com wrote:
On Friday 08 May 2009 16:01:14 Mike Kazantsev wrote:
Some greps (like BSD one) might not support '--color' option, so echo
hello|grep --color=auto l will return error code, skipping if clause,
and won't break
* Carlos Hendson (skyc...@gmx.net) wrote:
[1] The reason an error message is shown here is because it's bash
that's reporting the broken pipe error. Grep's error message was
redirected to /dev/null, which was:
grep: unrecognized option '--unsupported'
Usage: grep [OPTION]... PATTERN
19 matches
Mail list logo