Subject: bin/26278: missing options in the usage of sort(1)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 07/14/2004 11:52:55
>Number: 26278
>Category: bin
>Synopsis: missing options in the usage of sort(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 14 02:54:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Kouichirou Hiratsuka
>Release: NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD firefly.localdomain 2.0G NetBSD 2.0G (FIREFLY.MP) #22: Tue Jul 13 19:08:03 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
-H and -T are missing in the usage of sort(1).
>How-To-Repeat:
see usage
>Fix:
* add -H and -T to usage
* add program name to usage
* sort options (usage and SYNOPSIS)
Index: sort/sort.1
===================================================================
RCS file: /cvs/cvsroot/src/usr.bin/sort/sort.1,v
retrieving revision 1.24
diff -u -r1.24 sort.1
--- sort/sort.1 7 Aug 2003 11:32:34 -0000 1.24
+++ sort/sort.1 12 Jul 2004 00:17:52 -0000
@@ -74,15 +74,15 @@
.Nd sort or merge text files
.Sh SYNOPSIS
.Nm sort
-.Op Fl cmubdfHinrsS
-.Op Fl t Ar char
-.Op Fl R Ar char
+.Op Fl bcdfHimnrSsu
.Oo
.Fl k
.Ar field1 Ns Op Li \&, Ns Ar field2
.Oc
-.Op Fl T Ar dir
.Op Fl o Ar output
+.Op Fl R Ar char
+.Op Fl T Ar dir
+.Op Fl t Ar char
.Op Ar
.Sh DESCRIPTION
The
Index: sort/sort.c
===================================================================
RCS file: /cvs/cvsroot/src/usr.bin/sort/sort.c,v
retrieving revision 1.40
diff -u -r1.40 sort.c
--- sort/sort.c 14 Mar 2004 21:09:30 -0000 1.40
+++ sort/sort.c 12 Jul 2004 00:14:25 -0000
@@ -359,7 +359,10 @@
{
if (msg != NULL)
(void)fprintf(stderr, "sort: %s\n", msg);
- (void)fprintf(stderr, "usage: [-o output] [-cmubdfinrsS] [-t char] ");
- (void)fprintf(stderr, "[-R char] [-k keydef] ... [files]\n");
+ (void)fprintf(stderr,
+ "usage: %s [-bcdfHimnrSsu] [-k field1[,field2]] [-o output]"
+ " [-R char] [-T dir]", getprogname());
+ (void)fprintf(stderr,
+ " [-t char] [file ...]\n");
exit(2);
}
>Release-Note:
>Audit-Trail:
>Unformatted: