svn commit: r219084 - in head: bin/test tools/regression/bin/test

Alexander Leidinger Alexander at Leidinger.net
Sun Feb 27 15:48:16 UTC 2011


Quoting Joerg Sonnenberger <joerg at britannica.bec.de> (from Sun, 27 Feb  
2011 15:29:10 +0100):

> On Sun, Feb 27, 2011 at 03:11:43PM +0100, Erik Trulsson wrote:
>> On Sun, Feb 27, 2011 at 01:30:58PM +0100, Joerg Sonnenberger wrote:
>> > On Sun, Feb 27, 2011 at 12:28:06PM +0000, Xin LI wrote:
>> > > Author: delphij
>> > > Date: Sun Feb 27 12:28:06 2011
>> > > New Revision: 219084
>> > > URL: http://svn.freebsd.org/changeset/base/219084
>> > >
>> > > Log:
>> > >   Accept == as an alias of = which is a popular GNU extension.
>> >
>> > It is not a popular GNU extension. It is crap only bash supports.
>> > Do you really want to encourage that?
>>
>> In what way is it 'crap', and in what way would adding support for it
>> be a problem?
>
> It is completely redundant and inconsistent with pretty much every other
> test(1) implementation. E.g. it isn't even supported by /bin/test from
> coretutils. The very presence of this in various shell scripts is a
> direct result of silently accepting it in bash, even in sh mode. This is
> just further encouragement to legalize it.

For your info, at work we got a script (for Solaris) which had a mix  
of = and == (and [ ] and [[ ]]) as a delivery of some software.  
Needless to say it didn't work as expected. I also think that adding  
support for == encourages bad scripts.

Bye,
Alexander.

-- 
10.0 times 0.1 is hardly ever 1.0.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the svn-src-all mailing list