On Sat, Feb 23, 2008 at 10:17:56PM +0000, David Laight wrote:
> On Sat, Feb 23, 2008 at 02:18:09PM +0100, Elias Pipping wrote:
> >
> > I've come across what I believe to be a bug in jot(1).
> >
> > The bug affects jot(1) on OpenBSD, NetBSD, and Mac OS X, but not
> > FreeBSD.
> >
> > `jot -r 100000 97 98` is supposed to generate 100000 numbers in the
> > range from 97 to 98. That's what it does. Now `-c` is supposed to
> > convert those numbers to ASCII, but it also changes the range, which it
> > shouldn't.
>
> You need to do a slightly different test :-)
>
> Try 'jot -r 1000000 97 99 | sort | uniq -c' on the various systems.
> See the full horror of the bugs.
>
> David
Frightening indeed.
% ./jot_apple -r 1000000 97 99 | sort | uniq -c
250051 97
499824 98
250125 99
% ./jot_nbsd -r 1000000 97 99 | sort | uniq -c
250356 97
499900 98
249744 99
% ./jot_fbsd -r 1000000 97 99 | sort | uniq -c
333586 97
332833 98
333581 99
% ./jot_obsd -r 1000000 97 99 | sort | uniq -c
250018 97
500492 98
249490 99
-- Elias
Attachment:
pgpuEd25KGAkE.pgp
Description: PGP signature