Package: pdksh
Version: 5.2.14-21
Severity: normal

According to POSIX[*], "test \( ! -e \)" is a 4-argument test and is
here equivalent to "test ! -e". Note: here "-e" is not a switch, just
an non-empty string like in "test ! -e". But pdksh (like ksh93, bash
and dash, for which a bug has also been reported) yields an error:

$ test \( ! -e \) || echo $?
pdksh: test: missing closing paren
2

However this one is correct:

$ test ! -e || echo $?
1

The "test" utility from the Coreutils on the 4-argument test is correct:

$ /usr/bin/test \( ! -e \) || echo $?
1

(ditto with the latest zsh versions).

[*] http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
In particular, see the text starting at "The algorithm for determining
the precedence of the operators".

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.23.13-ws-intel64-p4 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages pdksh depends on:
ii  debianutils                   2.28.3     Miscellaneous utilities specific t
ii  libc6                         2.7-6      GNU C Library: Shared libraries

pdksh recommends no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to