/bin/sh and BIG NUMBERS

Bill Vermillion bv at wjv.com
Sun Apr 6 14:35:03 PDT 2003


On Sun, Apr 06, 2003 at 12:00 ,
freebsd-hackers-request at 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 at ceid.upatras.gr>
> Subject: Re: /bin/sh and BIG NUMBERS
> To: Alex Semenyaka <alexs at ratmir.ru>
> Cc: freebsd-hackers at freebsd.org
> Message-ID: <20030406032450.GC4130 at gothmog.gr>
> Content-Type: text/plain; charset=us-ascii

> On 2003-04-05 07:06, Alex Semenyaka <alexs at 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 at 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


More information about the freebsd-hackers mailing list