bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: leading zeros ignored by perl, ksh. not bash


From: Dan Douglas
Subject: Re: leading zeros ignored by perl, ksh. not bash
Date: Wed, 23 Jul 2014 17:52:42 -0500
User-agent: KMail/4.13.3 (Linux/3.16.0-rc6; KDE/4.13.3; x86_64; ; )

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]