From marcs@riffraff.plig.net  Mon Feb 16 04:32:38 2004
Return-Path: <marcs@riffraff.plig.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0BAAD16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Feb 2004 04:32:38 -0800 (PST)
Received: from riffraff.plig.net (riffraff.plig.net [195.40.6.40])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D334A43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Feb 2004 04:32:37 -0800 (PST)
	(envelope-from marcs@riffraff.plig.net)
Received: from localhost (localhost [127.0.0.1])
	by riffraff.plig.net (Postfix) with ESMTP id 1A6E7FA3F2
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 16 Feb 2004 12:32:37 +0000 (GMT)
Received: from riffraff.plig.net ([127.0.0.1])
 by localhost (riffraff.plig.net [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id 87595-01-4 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 16 Feb 2004 12:32:32 +0000 (GMT)
Received: by riffraff.plig.net (Postfix, from userid 3010)
	id A74A1FA3F3; Mon, 16 Feb 2004 12:32:32 +0000 (GMT)
Message-Id: <20040216123232.A74A1FA3F3@riffraff.plig.net>
Date: Mon, 16 Feb 2004 12:32:32 +0000 (GMT)
From: Marc Silver <marcs@riffraff.plig.net>
Reply-To: Marc Silver <marcs@riffraff.plig.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: missing information in tail and head manpages
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         62909
>Category:       docs
>Synopsis:       missing information in tail and head manpages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 16 04:40:15 PST 2004
>Closed-Date:    Mon Feb 16 10:03:11 PST 2004
>Last-Modified:  Mon Feb 16 10:03:11 PST 2004
>Originator:     Marc Silver
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD riffraff.plig.net 4.9-STABLE FreeBSD 4.9-STABLE #4: Mon Jan 5 11:52:58 GMT 2004 keet@riffraff.plig.net:/usr/src/sys/compile/RIFFRAFF i386


>Description:
	
	As described by Herculano de Lima Einloft Neto <hlen@ig.com.br>,
	there exists an error in the head and tail manpages whereby the
	-n <number> options can be specified as just -number, thereby
	omitting the -n flag.

	This isn't documented in the man pages, and though it may not be
	the 'correct' way, it is a valid option.

>How-To-Repeat:
	man tail
	man head
>Fix:

	Apply the following patches:

--- head.1-orig	Mon Feb 16 11:19:33 2004
+++ head.1	Mon Feb 16 14:14:42 2004
@@ -40,7 +40,7 @@
 .Nd display first lines of a file
 .Sh SYNOPSIS
 .Nm
-.Op Fl n Ar count | Fl c Ar bytes
+.Op Fl n Ar count | Fl c Ar bytes | Fl number
 .Op Ar
 .Sh DESCRIPTION
 This filter displays the first
@@ -52,6 +52,11 @@
 If
 .Ar count
 is omitted it defaults to 10.
+Optionally, the
+.Fl n
+flag may be omitted in favour of the
+.Ar count
+itself.
 .Pp
 If more than a single file is specified, each file is preceded by a
 header consisting of the string



--- tail.1-orig	Mon Feb 16 11:19:24 2004
+++ tail.1	Mon Feb 16 14:12:53 2004
@@ -51,7 +51,8 @@
 .Oo
 .Fl b Ar number |
 .Fl c Ar number |
-.Fl n Ar number
+.Fl n Ar number |
+.Fl number
 .Oc
 .Op Ar
 .Sh DESCRIPTION
@@ -114,6 +115,11 @@
 The location is
 .Ar number
 lines.
+.It Fl number
+This option works in the same way as the
+.Fl n
+flag, but it allows the silent dropping of the flag itself, and expects
+the location itself to be given.
 .It Fl r
 The
 .Fl r
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: schweikh 
State-Changed-When: Mon Feb 16 10:01:23 PST 2004 
State-Changed-Why:  
This is intentional. The -number behavior is deprecated and kept 
for compatibility reasons. POSIX requires -n number. To quote from 
SUSv3: "The obsolescent -number form is withdrawn." 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62909 
>Unformatted:
