Quote:
Originally Posted by
jim mcnamara
The POSIX-conforming shell on AIX is the Korn shell and the Korn shell includes the keyword
[[. So, I assume that you can use
[[ in AIX's
sh which is based on or linked to
ksh.
The text from the POSIX shell command language you pointed to above says:
Quote:
The following words may be recognized as reserved words on some implementations (when none of the characters are quoted), causing unspecified results:
[[ ]] function select
So, the POSIX standard allows
[[ expression ]] to be supported by conforming shells, but says absolutely nothing about what
[[ expression ]] does in a shell script.
The next revision of the POSIX standards and the Single UNIX Specification (which are likely to be balloted by IEEE, ISO/IEC, and The Open Group in about 3-7 years) is, in my personal opinion, likely to add defined behavior for the keywords
[[ and
]] and many, or all, of common set of
expressions that are available in both recent
bash and
ksh93 shells with
[[ expression ]]. You can see a very lengthy record of a small subset of the discussion on this topic in The Austin Group's bug report on this topic:
Bug #375: Extend test/[...] conditionals: ==, <, >, -nt, -ot, -ef. Note that this bug report is still open AND that the initially suggested Desired Action will NOT make it into the standard.