| lines - Output only the given lines of the input stream |
lines - Output only the given lines of the input stream
lines [RANGES [RANGES [...]]] [-- FILE [FILE [...]] | < FILE]
Read from from FILEs if specified, STDIN otherwise. RANGES is comma-delimited list of line numbers and inclusive ranges. Special word "EOF" in a range's upper limit represents the end of the file.
Starts the line numbering from 1.
If multiple files are given, restart the line numbering on each file.
Always displays the lines in the in-file order, not in arguments-order, how they were given in RANGES arguments; ie. does not buffer or seek in the input files. So lines 1,2 and lines 2,1 both display the 1st line before the 2nd.
Exit 2 if there was a range which was not found, ie. a file had less lines than requested.
| lines - Output only the given lines of the input stream |