tail: Add -num to usage and fix manpage to align with head.1

This commit is contained in:
sin 2015-03-05 08:13:42 +00:00
parent 68ccf5c0eb
commit eca23e5308
2 changed files with 7 additions and 8 deletions

13
tail.1
View File

@ -1,4 +1,4 @@
.Dd February 9, 2015 .Dd March 5, 2015
.Dt TAIL 1 .Dt TAIL 1
.Os sbase .Os sbase
.Sh NAME .Sh NAME
@ -7,7 +7,7 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl f .Op Fl f
.Op Fl c Ar num | Fl n Ar num | Fl N .Op Fl c Ar num | Fl n Ar num | Fl Ns Ar num
.Op Ar file ... .Op Ar file ...
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
@ -20,11 +20,10 @@ is given,
reads from stdin. reads from stdin.
.Sh OPTIONS .Sh OPTIONS
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl c Ar num | Fl n Ar num | Fl N .It Fl c Ar num | Fl n Ar num | Fl Ns Ar num
Display final Display final
.Ar num .Ar num
characters | lines | characters | lines |
.Ar N
lines. If lines. If
.Ar num .Ar num
begins with '+' begins with '+'
@ -49,6 +48,6 @@ utility is compliant with the
.St -p1003.1-2008 .St -p1003.1-2008
specification. specification.
.Pp .Pp
The The obsolete
.Op Fl N .Op Fl Ns Ar num
flag is an extension to that specification. syntax is an extension to that specification.

2
tail.c
View File

@ -74,7 +74,7 @@ taketail(FILE *fp, const char *str)
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-f] [-c num | -n num] [file ...]\n", argv0); eprintf("usage: %s [-f] [-c num | -n num | -num] [file ...]\n", argv0);
} }
int int