From owner-freebsd-bugs Sun Mar 24 17:30: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F21BD37B405 for ; Sun, 24 Mar 2002 17:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2P1U0h79150; Sun, 24 Mar 2002 17:30:00 -0800 (PST) (envelope-from gnats) Received: from descent.robbins.dropbear.id.au (227.c.001.mel.iprimus.net.au [203.134.131.227]) by hub.freebsd.org (Postfix) with ESMTP id 1523D37B400 for ; Sun, 24 Mar 2002 17:29:10 -0800 (PST) Received: (from tim@localhost) by descent.robbins.dropbear.id.au (8.11.6/8.11.6) id g2P1QCx16439; Mon, 25 Mar 2002 12:26:13 +1100 (EST) (envelope-from tim) Message-Id: <200203250126.g2P1QCx16439@descent.robbins.dropbear.id.au> Date: Mon, 25 Mar 2002 12:26:13 +1100 (EST) From: "Tim J. Robbins" Reply-To: "Tim J. Robbins" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/36270: join(1) SYNOPSIS and usage() are misleading Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36270 >Category: bin >Synopsis: join(1) SYNOPSIS and usage() are misleading >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 24 17:30:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Tim J. Robbins >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD descent.robbins.dropbear.id.au 4.5-STABLE FreeBSD 4.5-STABLE #17: Thu Mar 21 19:48:18 EST 2002 tim@descent.robbins.dropbear.id.au:/usr/obj/usr/src/sys/DESCENT i386 >Description: The SYNOPSIS section of join(1) and the usage() function in join.c indicate that you can invoke it as "join -a 2" (for example), which does not work due to hacks added to make obsolete syntax work. >How-To-Repeat: join -a 2 foo bar >Fix: This patch corrects the documentation. According to the SUSV3 standard, we should accept both -a2 and -a 2, and error when -a is used without an argument, however. The POSIX.2 conformance claim may also need to be removed from the manual page. Index: join.1 =================================================================== RCS file: /home/ncvs/src/usr.bin/join/join.1,v retrieving revision 1.7 diff -u -r1.7 join.1 --- join.1 2001/08/15 09:09:41 1.7 +++ join.1 2002/03/25 01:23:24 @@ -44,7 +44,7 @@ .Sh SYNOPSIS .Nm .Oo -.Fl a Ar file_number | Fl v Ar file_number +.Fl a Ns Ar file_number | Fl v Ar file_number .Oc .Op Fl e Ar string .Op Fl j Ar file_number field Index: join.c =================================================================== RCS file: /home/ncvs/src/usr.bin/join/join.c,v retrieving revision 1.11 diff -u -r1.11 join.c --- join.c 2002/03/22 01:22:46 1.11 +++ join.c 2002/03/25 01:23:29 @@ -590,7 +590,7 @@ usage() { (void)fprintf(stderr, "%s %s\n%s\n", - "usage: join [-a fileno | -v fileno ] [-e string] [-1 field]", + "usage: join [-afileno | -v fileno ] [-e string] [-1 field]", "[-2 field]", " [-o list] [-t char] file1 file2"); exit(1); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message