Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 2003 17:34:53 -0400
From:      Bill Vermillion <bv@wjv.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: /bin/sh and BIG NUMBERS
Message-ID:  <20030406213453.GB4780@wjv.com>
In-Reply-To: <20030406190054.AA08537B404@hub.freebsd.org>
References:  <20030406190054.AA08537B404@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 06, 2003 at 12:00 ,
freebsd-hackers-request@freebsd.org exclaimed "Las Cucarachas
entran, Pero no puede en salir", and then rambled on saying with:
 
>    2. Re: /bin/sh and BIG NUMBERS (Giorgos Keramidas)


> Message: 2
> Date: Sun, 6 Apr 2003 06:24:50 +0300
> From: Giorgos Keramidas <keramida@ceid.upatras.gr>
> Subject: Re: /bin/sh and BIG NUMBERS
> To: Alex Semenyaka <alexs@ratmir.ru>
> Cc: freebsd-hackers@freebsd.org
> Message-ID: <20030406032450.GC4130@gothmog.gr>
> Content-Type: text/plain; charset=us-ascii

> On 2003-04-05 07:06, Alex Semenyaka <alexs@ratmir.ru> wrote:
> > I found that /bin/sh cannot handle numbers those do not fit to integer
> > type.  That is not too bad. Too bad that it just silently warps them
> > in arithmetical operations:

> > alexs@snark> /bin/sh -c 'echo $((10000000000-1))'
> > 2147483646

Not all shells have that problem.  I'm using the real KSH from AT&T
via the ports.  It's returns 999999999 quite nicely :-)

This is just an FYI - and /bin/sh should get changed.


> End of freebsd-hackers Digest, Vol 2, Issue 8
> *********************************************

-- 
Bill Vermillion - bv @ wjv . com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030406213453.GB4780>