aboutsummaryrefslogtreecommitdiff
path: root/pkg/system/doc/tail.hlp
blob: bd91e61731280930ce3337fd08da850b4bbd860e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.help tail Nov84 system
.ih
NAME
tail -- print the last few lines of the specified files
.ih
USAGE
tail files
.ih
PARAMETERS
.ls files
A template specifying the files to be listed.
.le
.ls nlines = 12
The number of lines to be printed.  If negative, the number
of lines to be skipped, counting from the beginning of the file.
.le
.ih
DESCRIPTION
For each file in the input file list, \fItail\fR copies the last \fInlines\fR
of the file to the standard output.  If there is more than one file in the
input file list, as one line header is printed before each file.
If "nlines" is negative, then abs(nlines) lines are skipped, and the rest
of the file is printed, i.e., the tail of the file is still printed, but
the offset is measured from the beginning of the file rather than the end.
.ih
EXAMPLES

1. Prints the last 12 lines of each help file in the current directory.

	cl> tail *.hlp

2. Print the last line of each help file.

	cl> tail *.hlp nl=1

3. Prints the third through fifth lines of "file".  The same thing
might be done (at least conceptually) by "head file,nlines=5"
piped into "tail ,nlines=3".  However, \fItail\fR does not work on STDIN.

.nf
	cl> tail file nl=-2 | head nl=3
.fi
.ih
BUGS
\fITail\fR does not presently work on standard input, and therefore cannot
be used in pipes.
.ih
SEE ALSO
head
.endhelp