Your message dated Mon, 8 Jun 2026 00:25:16 +0530
with message-id <[email protected]>
and subject line Re: Bug#733631: ksh compatibility
has caused the Debian Bug report #733631,
regarding ksh: octal support in arithmetic evaluation breaks ksh compatibility
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.)
--
733631: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733631
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ksh
Version: 93u+20120801-1
Severity: normal
ksh93 and mksh behave differently:
xvii% ksh93 -c 'echo $((010))'
8
xvii% mksh -c 'echo $((010))'
10
breaking the needed compatibility with each other since they are both
/bin/ksh alternatives, and valid "#!/bin/ksh" scripts should behave
consistently with both shells.
According to Thorsten Glaser (the mksh maintainer), the bug is in
ksh93[*]:
|ksh93 can break scripts with "#!/bin/ksh" because interpreting
|leading-digit-zero numbers as octal is a *very* recent change,
|and is *known* to break existing scripts. Not the other way round.
[*] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732509#25
Note: ksh can still have some POSIX compatibility mode when run
as sh, like other shells like mksh (actually the lksh version),
bash and zsh.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.12-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ksh depends on:
ii libc6 2.17-97
ksh recommends no packages.
ksh suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Version: ksh93u+m 1.0.0~beta.2-1
Hi Vincent,
This has been fixed in ksh93u+m as of 1.0.0-beta.2. Octal is now opt-in
via --posix and consistent with mksh.
$ ksh93 -c 'echo $((010))'
10
$ ksh93 -c --posix 'echo $((010))'
8
$ mksh -c 'echo $((010))'
10
$ mksh -o posix -c 'echo $((010))'
8
Thanks for flagging it, and reopen if anything is off.
Anuradha
--- End Message ---