Showing posts with label head. Show all posts
Showing posts with label head. Show all posts

23 April 2007

remove first lines from a file

head shows the first N lines of a file
tail shows the last N lines of a file.
But what if you want to remove the first N lines of a file? Simply show the last lines of the file startin' from the N+1 line! Ok, the point is that tail has an option like this: simply give the line number to start from just after the plus sign. Exempli gratia:
tail +12 too_much_header_lines.out > just_lines_I_want.out