- May
- 3,515
- 5
HEAD permits combining /N+x and /Nn, thus allowing to bypass the multiline
header and then extracting the first few data lines of a file. TAIL does not
offer the symmetric concept of extracting the last few data lines preceding
the trailer. It would be useful for TAIL to accept a negative value /N-x, so
that /N-x /N2 would report 2 lines, starting x lines before EOF.
Examples:
Assume file F has a 3-line header and 4-line trailer.
The first line of data reported by (existing syntax):
head /n+3 /n1 F
The last line of data reported by new syntax:
tail /n-5 /n1 F
--
Steve
header and then extracting the first few data lines of a file. TAIL does not
offer the symmetric concept of extracting the last few data lines preceding
the trailer. It would be useful for TAIL to accept a negative value /N-x, so
that /N-x /N2 would report 2 lines, starting x lines before EOF.
Examples:
Assume file F has a 3-line header and 4-line trailer.
The first line of data reported by (existing syntax):
head /n+3 /n1 F
The last line of data reported by new syntax:
tail /n-5 /n1 F
--
Steve