Your message dated Tue, 4 May 2010 16:07:25 +0000
with message-id
<20100504160725.18043.qm...@f255ef013458f2.315fe32.mid.smarden.org>
and subject line Re: Bug#503840: ash: "." not recognising "--" as the
end-of-options
has caused the Debian Bug report #503840,
regarding ash: "." not recognising "--" as the end-of-options
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.)
--
503840: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=503840
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ash
Version: 0.5.4-12
Severity: normal
Hiya,
$ ash -c '. -- --help'
.: 1: --: not found
The handling of "--" is mandated by POSIX I beleive.
With ksh, pdksh, bash and in a POSIX script in general as POSIX
allows any "." implementation to recognise options, you have to
use:
. -- "$1"
if you can't guarantee that "$1" won't start with a "-".
Unfortunately, that code doesn't work with ash, so a POSIX
script written in such a robust way will fail on those systems
where ash is the POSIX sh interpreter.
Best regards,
Stephane
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages ash depends on:
ii dash 0.5.4-12 POSIX-compliant shell
ash recommends no packages.
ash suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Tue, Oct 28, 2008 at 04:51:03PM +0000, Stephane Chazelas wrote:
> Hiya,
>
> $ ash -c '. -- --help'
> .: 1: --: not found
>
> The handling of "--" is mandated by POSIX I beleive.
>
> With ksh, pdksh, bash and in a POSIX script in general as POSIX
> allows any "." implementation to recognise options, you have to
> use:
>
> . -- "$1"
>
> if you can't guarantee that "$1" won't start with a "-".
>
> Unfortunately, that code doesn't work with ash, so a POSIX
> script written in such a robust way will fail on those systems
> where ash is the POSIX sh interpreter.
Hi Stephane,
the dot special builtin doesn't know about the -- option according to
posix, and 'conforming application shall not use that argument'.
See
http://www.opengroup.org/onlinepubs/009695399/utilities/dot.html
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_14
Regards, Gerrit.
--- End Message ---