head /tail : select lines
The head command copies to output the first 10 lines of input.
The tail command copies to output the last 10 lines of input.
The - Number option changes how many lines are copied.
E.g. head -30 copies to output the first 30 lines of input.
Can combine head and tail to select a range of lines.
E.g. head -100 | tail -20 copies lines 81..100 to output.
With more than one file prefixes with name (see labs).
|