bug-grep
[Top][All Lists]
Advanced

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

Re: [bug-grep] patch #3477 overview: Tests for --only-matching


From: Paul Eggert
Subject: Re: [bug-grep] patch #3477 overview: Tests for --only-matching
Date: Thu, 24 Feb 2005 13:08:10 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Julian Foad <address@hidden> writes:

>>   -- replace ${GREP=...} by ${GREP:=...}
>
> Hmm.  The former is used throughout our test scripts, but I can't find
> any documentation on what it means.

The two mean the same thing, except that the latter treats GREP as
being unset if it is empty.  This is documented, for example, at
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02>,
which says "use of the colon in the format shall result in a test for
a parameter that is unset or null; omission of the colon shall result
in a test for a parameter that is only unset."

The latter form is not supported in some older (pre-POSIX) shells, so
I'd stick to the former: it's more portable.




reply via email to

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