Package: dash
Version: 0.5.4-12
Severity: normal

dash accepts the following syntax:

for i; do...

but this is not correct POSIX syntax, as documented here:

http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_02

where it says:

    for name [ in [word ... ]]do
        compound-list


    done

Note that a semi-colon is required by the list syntax "word..." if an
"in" clause is used, but is not required, or indeed permitted,
otherwise.

Accepting this syntax is nice for those of us used to bash, as it
accepts this syntax, and its man page incorrectly says that the
semi-colon is mandatory; but it is less good for those of us who rely
on dash to catch POSIX compliance failures! (This bit me with /bin/sh
on a Solaris system.)

(I have reported the bug in bash's man page too. There's also a
corresponding pair of syntax coloring bugs in Emacs's shell-script
mode which I've also reported.)

-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dash depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries

dash recommends no packages.

dash suggests no packages.

-- debconf information excluded



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

Reply via email to