Your message dated Sun, 28 Sep 2014 18:45:21 +0000 (UTC)
with message-id <[email protected]>
and subject line Re: Bug#763190: $((0777)) not recognised as octal
has caused the Debian Bug report #763190,
regarding $((0777)) not recognised as octal
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.)
--
763190: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763190
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mksh
Version: 50b-1
Severity: minor
$ sh -c 'echo $((0777))'
511
$ ksh93 -c 'echo $((0777))'
511
$ bash -c 'echo $((0777))'
511
$ mksh -c 'echo $((0777))'
777
POSIX says:
The arithmetic expression shall be processed according to the rules given
in Arithmetic Precision and Operations, with the following exceptions:
[...]
* Only the decimal-constant, octal-constant, and hexadecimal-constant
constants specified in the ISO C standard, Section 6.4.4.1 are
required to be recognized as constants.
--- End Message ---
--- Begin Message ---
Juliusz Chroboczek dixit:
> $ mksh -c 'echo $((0777))'
> 777
>POSIX says:
Yes, this is ⓐ new in POSIX and ⓑ POSIX being stupid.
I consider this feature dangerous, and have asked for
it to be optional, in POSIX.
Until then:
$ mksh -o posix -c 'echo $((0777))'
511
When invoked as sh or -sh on Debian, mksh automatically
enables this mode. So, closing as “not a bug”.
bye,
//mirabilos
--
“It is inappropriate to require that a time represented as
seconds since the Epoch precisely represent the number of
seconds between the referenced time and the Epoch.”
-- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
--- End Message ---