Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15057

Re: Arithmetic evaluation of negative numbers with base prefix

From Ilkka Virta <itvirta@iki.fi>
Newsgroups gnu.bash.bug
Subject Re: Arithmetic evaluation of negative numbers with base prefix
Date 2019-06-18 19:13 +0300
Message-ID <mailman.360.1560874431.10840.bug-bash@gnu.org> (permalink)
References (3 earlier) <20190617154708.GG2072@eeg.ccf.org> <bc6739d9-03f2-44b2-5bb5-22599e41cb5b@iki.fi> <edd48697-d959-808f-f9d5-873fc9a647f2@case.edu> <20190618152013.GM2072@eeg.ccf.org> <a7e8a7f9-988c-3551-f48f-94fc0b0551d9@iki.fi>

Show all headers | View raw


On 18.6. 18:20, Greg Wooledge wrote:
> On Tue, Jun 18, 2019 at 10:27:48AM -0400, Chet Ramey wrote:
>> $ ksh93 -c 'echo ${.sh.version}'
>> Version ABIJM 93v- 2014-09-29
>> $ ksh93 -c 'echo $(( 10# ))'
>> ksh93:  10# : arithmetic syntax error
> 
> I guess most Linux distributions are not shipping the 2014 version of
> ksh93 yet...?

Yeah, I had the one from Debian. I'm not even sure what the current 
version of ksh is.

At least the newer versions throw an error instead of silently doing the 
unexpected.

> wooledg:~$ ksh -c 'echo $(( 10# ))'
> 0
> wooledg:~$ dpkg -l ksh | tail -1
> ii  ksh            93u+20120801-3.4 amd64        Real, AT&T version of the Korn shell
> wooledg:~$ ksh -c 'echo ${.sh.version}'
> Version AJM 93u+ 2012-08-01
> 
> Seems kinda weird to continue calling it "ksh93" if it's being changed,
> but I don't make the decisions.
> 


-- 
Ilkka Virta / itvirta@iki.fi

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Arithmetic evaluation of negative numbers with base prefix Ilkka Virta <itvirta@iki.fi> - 2019-06-18 19:13 +0300

csiph-web