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
.Os sbase
.Sh NAME
@ -7,7 +7,7 @@
.Sh SYNOPSIS
.Nm
.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 ...
.Sh DESCRIPTION
.Nm
@ -20,11 +20,10 @@ is given,
reads from stdin.
.Sh OPTIONS
.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
.Ar num
characters | lines |
.Ar N
lines. If
.Ar num
begins with '+'
@ -49,6 +48,6 @@ utility is compliant with the
.St -p1003.1-2008
specification.
.Pp
The
.Op Fl N
flag is an extension to that specification.
The obsolete
.Op Fl Ns Ar num
syntax is an extension to that specification.

2
tail.c
View File

@ -74,7 +74,7 @@ taketail(FILE *fp, const char *str)
static 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