From swear@blarg.net  Thu Jan 24 10:14:35 2002
Return-Path: <swear@blarg.net>
Received: from lists.blarg.net (lists.blarg.net [206.124.128.17])
	by hub.freebsd.org (Postfix) with ESMTP id DAC9737B404
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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: <ofr8of8vgf.8of@localhost.localdomain>
Date: 24 Jan 2002 10:17:36 -0800
From: "Gary W. Swearingen" <swear@blarg.net>
Reply-To: swear@blarg.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: head(1) program's "usage" is wrong re -n and -c.
X-GNATS-Notify:

>Number:         34233
>Category:       bin
>Synopsis:       head(1) program's "usage" is wrong re -n and -c.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 24 10:20:01 PST 2002
>Closed-Date:    Sat Feb 16 04:29:42 PST 2002
>Last-Modified:  Sat Feb 16 04:30:08 PST 2002
>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:
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Thu Jan 24 14:27:59 PST 2002 
Responsible-Changed-Why:  
I've committed a change to -current which also corrects the man page 
synopsis. I'll MFC it in a few days. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34233 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Sat Feb 16 04:29:42 PST 2002 
State-Changed-Why:  
Fixed in -current and -stable. Thanks for the patch. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34233 
>Unformatted:
