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: Chet Ramey
Subject: Re: leading zeros ignored by perl, ksh. not bash
Date: Wed, 23 Jul 2014 17:02:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 7/23/14, 4:49 PM, Dan Douglas wrote:

> I don't believe there are any cases in which ksh interprets a leading
> zero, at least not current versions. If you want octal you must use
> either 8#num or typeset -ibase. Same applies to both zsh and mksh
> AFAICT.

$ ksh93 -c 'echo $(( 010 ))'
8

Posix requires it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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