NetBSD Problem Report #12424
Received: (qmail 25242 invoked from network); 16 Mar 2001 22:06:09 -0000
Message-Id: <200103162206.f2GM68200813@knox.mines.edu>
Date: Fri, 16 Mar 2001 15:06:08 -0700 (MST)
From: jbernard@mines.edu
Reply-To: jbernard@mines.edu
To: gnats-bugs@gnats.netbsd.org
Subject: recent rototillage of jot has broken it's output
X-Send-Pr-Version: 3.95
>Number: 12424
>Category: bin
>Synopsis: recent rototillage of jot has broken it's output
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: jdolecek
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 16 22:07:00 +0000 2001
>Closed-Date: Mon Mar 19 02:30:34 +0000 2001
>Last-Modified: Tue Mar 20 06:20:01 +0000 2012
>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:
Responsible-Changed-From-To: bin-bug-people->jdolecek
Responsible-Changed-By: jdolecek
Responsible-Changed-When: Fri Mar 16 16:23:49 PST 2001
Responsible-Changed-Why:
I broke this, hence I should fix it.
State-Changed-From-To: open->feedback
State-Changed-By: simonb
State-Changed-When: Sat Mar 17 03:43:47 PST 2001
State-Changed-Why:
This should be fixed with rev 1.8. Please advise if everything is
ok now.
Thanks.
State-Changed-From-To: feedback->closed
State-Changed-By: simonb
State-Changed-When: Sun Mar 18 18:30:05 PST 2001
State-Changed-Why:
PR originator reports that the problem is fixed.
Thanks for your bug report!
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/12424 CVS commit: src
Date: Tue, 20 Mar 2012 06:18:34 +0000
Module Name: src
Committed By: jruoho
Date: Tue Mar 20 06:18:34 UTC 2012
Modified Files:
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/usr.bin: Makefile
Added Files:
src/tests/usr.bin/jot: Makefile d_basic.out t_jot.sh
Log Message:
Add regression tests for PR bin/12424, PR bin/12316, and PR bin/14253,
all fixed long time ago.
To generate a diff of this commit:
cvs rdiff -u -r1.452 -r1.453 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.68 -r1.69 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.12 -r1.13 src/tests/usr.bin/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/jot/Makefile \
src/tests/usr.bin/jot/d_basic.out src/tests/usr.bin/jot/t_jot.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.