Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Feb 2011 16:30:13 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Joerg Sonnenberger <joerg@britannica.bec.de>
Cc:        svn-src-all@freebsd.org
Subject:   Re: svn commit: r219084 - in head: bin/test tools/regression/bin/test
Message-ID:  <20110227163013.67016iavb4r2trgo@webmail.leidinger.net>
In-Reply-To: <20110227142910.GA13518@britannica.bec.de>
References:  <201102271228.p1RCS6qG087131@svn.freebsd.org> <20110227123058.GA9092@britannica.bec.de> <20110227141143.GA11874@owl.midgard.homeip.net> <20110227142910.GA13518@britannica.bec.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Joerg Sonnenberger <joerg@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110227163013.67016iavb4r2trgo>