You would think that there must be a utility in Unix like head or tail that would chop off the first few lines of a file and output the rest. Well, I haven’t found it yet.
In any case, perl worked.
cat foo.txt | perl -e "print splice @{[<>]}, 5″
18:42 on June 30th, 2005
tail +n returns all lines starting from line n. This combined with head, can give you any contiguous subinterval of the lines of a file
18:49 on June 30th, 2005
Ah, that’s brilliant. Thanks!
19:27 on June 30th, 2005
cat foo.txt | sed -e ‘1,5 d’
22:18 on June 30th, 2005
cat foo.txt | awk ‘NR >= n’
you can put more complex conditional expressions inside.
16:22 on December 20th, 2005
http://packages.debian.org/buthead