Subject: bin/12424: recent rototillage of jot has broken it's output
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jbernard@mines.edu>
List: netbsd-bugs
Date: 03/16/2001 15:06:08
>Number: 12424
>Category: bin
>Synopsis: recent rototillage of jot has broken it's output
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 16 14:07:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Jim Bernard
>Release: March 16, 2001
>Organization:
>Environment:
System: NetBSD knox 1.5S NetBSD 1.5S (KNOX-$Revision: 1.14 $) #0: Thu Mar 15 11:09:03 MST 2001 jbernard@knox:/fh/home/tmp/compile/sys/arch/sparc/compile/KNOX sparc
Architecture: sparc
Machine: sparc
>Description:
jot used to be handy for generating random numeric values. Indeed,
the man page says so:
The jot utility is used to print out increasing, decreasing,
random, or redundant data (usually numbers) one per line.
(note the "usually numbers"). But now, the output is, by default,
in the form of characters, which breaks scripts that depend upon
the previous and documented behavior. The first example in the
man page:
jot 21 -1 1.00
prints 21 evenly spaced numbers increasing from -1 to 1
no longer works, for example. It just prints junk. Actually,
all the values are the same (nulls), except for the first,
because of the default precision.
>How-To-Repeat:
Try the first example from the man page. I find the same problems
on both a sparc and an i386 with the new jot. BTW: the old binary
produces:
-1.00
-0.90
-0.80
-0.70
-0.60
-0.50
-0.40
-0.30
-0.20
-0.10
-0.00
0.10
0.20
0.30
0.40
0.50
0.60
0.70
0.80
0.90
1.00
with the example above. With the new one, you need something like
jot -w%.2f 21 -1 1.00
to get the same output.
>Fix:
Not provided. It is still possible to get numeric output
by specifying a numeric format explicitly (-w%d or -w%f),
but it shouldn't be necessary to do that, and it's better
not to break existing scripts (yes, it broke one of mine,
and the breakage prevented me from loggin in) and conflict
with the man page.
>Release-Note:
>Audit-Trail:
>Unformatted: