bash vs. ash, [ ! a = b ] vs. [ a != b ]

Jim Freeman jfree at sovereign.org
Thu Jul 5 16:38:19 UTC 2007


powerpc, busybox 1.6.0

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


This is breaking scripts that have worked previously.

If I'm doing something stupid, let me know - I can take it (I'm
used to it ...)

thanks,
...jfree



More information about the busybox mailing list