[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: handling of test == by BASH's POSIX mode
From: |
Geir Hauge |
Subject: |
Re: handling of test == by BASH's POSIX mode |
Date: |
Sun, 27 May 2012 09:39:43 +0200 |
2012/5/27 Jon Seymour <jon.seymour@gmail.com>:
> Is there a reason why bash doesn't treat == as an illegal test
> operator when running in POSIX mode?
POSIX does not say == is not allowed.
POSIX tells you what the shell should at least be able to do. A POSIX
compliant shell can have whatever other features it likes, as long as
the POSIX features are covered.
> 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.
Don't use non-POSIX features in a POSIX script, and you'll be fine.
http://www.opengroup.org/onlinepubs/9699919799/utilities/contents.html
--
Geir Hauge
- handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/27
- Re: handling of test == by BASH's POSIX mode,
Geir Hauge <=
- Re: handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Andreas Schwab, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Dan Douglas, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/27
- Re: handling of test == by BASH's POSIX mode, Eric Blake, 2012/05/28
- Re: handling of test == by BASH's POSIX mode, Jon Seymour, 2012/05/28