2021-02-26 02:07:29 +00:00
|
|
|
.TH LINE 1
|
2021-02-22 11:24:31 +00:00
|
|
|
.SH NAME
|
2021-02-26 02:07:29 +00:00
|
|
|
line \- extract line(s) from input
|
2021-02-22 11:24:31 +00:00
|
|
|
.SH SYNOPSIS
|
2021-02-26 02:07:29 +00:00
|
|
|
.B line
|
2021-02-22 11:24:31 +00:00
|
|
|
.IR [LINES...]
|
|
|
|
.SH DESCRIPTION
|
2021-02-26 02:07:29 +00:00
|
|
|
.B line
|
2021-02-22 11:30:34 +00:00
|
|
|
extracts one or more lines from stdin. If multiple lines are provided, they will
|
|
|
|
be sorted numerically. If the same line is specified twice, it will only be
|
|
|
|
extracted once.
|
2021-02-22 11:24:31 +00:00
|
|
|
.SH EXAMPLES
|
2021-02-26 02:07:29 +00:00
|
|
|
Get the 3rd line from the file line.1
|
2021-02-22 11:24:31 +00:00
|
|
|
.PP
|
|
|
|
.nf
|
|
|
|
.RS
|
2021-02-26 02:07:29 +00:00
|
|
|
line 3 < line.1
|
2021-02-22 11:24:31 +00:00
|
|
|
.RE
|
|
|
|
.fi
|
2021-02-22 11:30:34 +00:00
|
|
|
.PP
|
2021-02-26 02:07:29 +00:00
|
|
|
Get the 3rd and 4th most recent files in a directory
|
2021-02-22 11:24:31 +00:00
|
|
|
.PP
|
|
|
|
.nf
|
|
|
|
.RS
|
2021-02-26 02:07:29 +00:00
|
|
|
ls -1t | line 3 4
|
|
|
|
.RE
|
|
|
|
.fi
|
|
|
|
.PP
|
|
|
|
Get the 5th-10th lines from the file line.1
|
|
|
|
.PP
|
|
|
|
.nf
|
|
|
|
.RS
|
|
|
|
line $(seq 5 10) < line.1
|
2021-02-22 11:24:31 +00:00
|
|
|
.RE
|
|
|
|
.fi
|