From owner-freebsd-bugs Thu Jan 24 10:20:32 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 4EF9437B416 for ; Thu, 24 Jan 2002 10:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0OIK1f09747; Thu, 24 Jan 2002 10:20:01 -0800 (PST) (envelope-from gnats) Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id DAC9737B404 for ; Thu, 24 Jan 2002 10:14:34 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id 415BFBD79 for ; Thu, 24 Jan 2002 10:14:34 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id KAA17478 for ; Thu, 24 Jan 2002 10:14:33 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g0OIHbF02366; Thu, 24 Jan 2002 10:17:37 -0800 (PST) (envelope-from swear@blarg.net) Message-Id: Date: 24 Jan 2002 10:17:36 -0800 From: "Gary W. Swearingen" Reply-To: swear@blarg.net To: FreeBSD-gnats-submit@freebsd.org Subject: bin/34233: head(1) program's "usage" is wrong re -n and -c. 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: 34233 >Category: bin >Synopsis: head(1) program's "usage" is wrong re -n and -c. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 24 10:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Gary W. Swearingen >Release: FreeBSD 4.5-PRERELEASE i386 >Organization: none >Environment: n/a ================ >Description: The head(1) program usage string is "usage: head [-n lines] [-c bytes] [file ...]\n" but should be "usage: head [-n lines | -c bytes] [file ...]\n". ================ >How-To-Repeat: $ head -n 3 -c 3 head: can't combine line and byte counts $ head -h head: illegal option -- h usage: head [-n lines] [-c bytes] [file ...] ================ >Fix: (Untested.) patch -d "/usr/src/usr.bin/head" < this-PR --- /tmp/head..orig.c Thu Jan 24 09:40:50 2002 +++ /tmp/head.c Thu Jan 24 09:41:06 2002 @@ -187,6 +187,6 @@ void usage() { - (void)fprintf(stderr, "usage: head [-n lines] [-c bytes] [file ...]\n"); + (void)fprintf(stderr, "usage: head [-n lines | -c bytes] [file ...]\n"); 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