/bin/sh and BIG NUMBERS

Alex Semenyaka alexs at ratmir.ru
Mon Apr 7 17:17:23 PDT 2003


On Sun, Apr 06, 2003 at 05:34:53PM -0400, Bill Vermillion wrote:
> >> alexs at snark> /bin/sh -c 'echo $((10000000000-1))'
> Not all shells have that problem.  I'm using the real KSH from AT&T
> via the ports.  It's returns 999999999 quite nicely :-)

Thanks, and sure I know it. I've check different shells before patching
/bin/sh.

That's not enough that there are shells which do not suffer from the
problem described above. The REAL problem is that NOW we have 64-bit
counters in ipfw, we have lots-of-gigs harddrives and so on. And some
people continue to use OWN OLD scripts (i.e. for system maintenance)
which will NOW silently produce just wrong results. That's why I suggest
to fix /bin/sh.

								SY, Alex


More information about the freebsd-hackers mailing list