[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: leading zeros ignored by perl, ksh. not bash
From: Dan Douglas <ormaaj () gmail ! com>
Date: 2014-07-23 22:52:42
Message-ID: 4929953.xOLs8rU4xb () smorgbox
[Download RAW message or body]
On Wednesday, July 23, 2014 05:44:25 PM Dan Douglas wrote:
> On Wednesday, July 23, 2014 05:02:42 PM Chet Ramey wrote:
> > ksh93 -c 'echo $(( 010 ))'
>
> Oh heh. Maybe a compile-time option or something I'm doing wrong... I always
> assumed it intentionally violates POSIX.
>
> I also just noticed zsh interprets it in bash and sh mode but not ksh or zsh
> mode. (it's the very first difference I've ever noticed in zsh between bash
> and ksh emulations.)
Ah, I did do it wrong.
$ ksh -c 'echo $((09))'
9
I interpreted the lack of error as not recognizing the 0.
--
Dan Douglas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic