Your message dated Wed, 14 Dec 2022 04:33:38 +0100
with message-id <[email protected]>
and subject line Bug#522844: the syntax in question has been standard since
POSIX Issue 7 TC2
has caused the Debian Bug report #522844,
regarding dash: Accepts non-POSIX "for" syntax
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
522844: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522844
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
Hi!
As noted in the cloned bug (#599492), this was forwarded to
https://www.austingroupbugs.net/view.php?id=581
which was approved in 2013, and POSIX Issue 7 TC 2 (the "2016 edition"):
https://pubs.opengroup.org/onlinepubs/9699919799.2016edition/utilities/V3_chap02.html
includes the change by allowing all forms:
for_clause : For name do_group
| For name sequential_sep do_group
| For name linebreak in sequential_sep do_group
| For name linebreak in wordlist sequential_sep do_group
naturally, the first one is
for i do ...
and the second
for i; do ...
for i;
do ...
for i
do
&c.
Which means that this syntax is not only legal, but required,
which makes this report invalid, or, I guess "premise fixed in POSIX"?
Best,
наб
signature.asc
Description: PGP signature
--- End Message ---