[BusyBox 0001423]: [ ! a = b ] vs. [ a != b ]

bugs at busybox.net bugs at busybox.net
Wed Jul 11 23:13:36 UTC 2007


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1423 
====================================================================== 
Reported By:                jfree
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1423
Category:                   Standards Compliance
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             07-05-2007 12:08 PDT
Last Modified:              07-11-2007 16:13 PDT
====================================================================== 
Summary:                    [ ! a = b ] vs. [ a != b ]
Description: 
There is a discrepency (== error?) in ash's handling of the following:

ash
===
# [ ! a = b ]
# echo $?
1

# [ a != b ]
# echo $?
0


bash
====
$ [ ! a = b ]
$ echo $?
0

$ [ a != b ]
$ echo $?
0

On Thu, Jul 05, 2007 at 12:51:24PM -0400, Paul Smith wrote:
...
> According to the POSIX standard, this form is valid and ash's answer is
> wrong.
...
> This should be fixed in ash, because it's a bug... but I wonder why you
> just don't use the much more common (and hence more likely to work
> properly) "[ a != b ]"?

More info:

Regressing against i386 BusyBox v1.1.3 (Debian 1:1.1.3-4) :

        $ busybox [ ! a = b ]
        $ echo $?
        0

====================================================================== 

---------------------------------------------------------------------- 
 vda - 07-11-07 16:13  
---------------------------------------------------------------------- 
Fixed in 1.6.1 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-05-07 12:08  jfree          New Issue                                    
07-05-07 12:08  jfree          Status                   new => assigned     
07-05-07 12:08  jfree          Assigned To               => BusyBox         
07-11-07 16:13  vda            Status                   assigned => closed  
07-11-07 16:13  vda            Note Added: 0002592                          
======================================================================




More information about the busybox-cvs mailing list