[Top][All Lists]

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

handling of test == by BASH's POSIX mode

From: Jon Seymour
Subject: handling of test == by BASH's POSIX mode
Date: Sun, 27 May 2012 17:15:47 +1000

Is there a reason why bash doesn't treat == as an illegal test
operator when running in POSIX mode?

This is problematic because use of test == in scripts that should be
POSIX isn't getting caught when I run them under bash's POSIX mode.
The scripts then fail when run under dash which seems to be stricter
about this.

I have reconfigured my system's default /bin/sh back to /bin/dash to
ensure better POSIX compliance, but it would be nice if I didn't have
to do that.

I am running Ubuntu's distribution of bash, per:

address@hidden:~/tracked/git$ uname -a
Linux ubuntu 2.6.32-41-generic #88-Ubuntu SMP Thu Mar 29 13:10:32 UTC
2012 x86_64 GNU/Linux
address@hidden:~/tracked/git$ bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


reply via email to

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