PDA

View Full Version : "head" - Command



zoobave
July 11th, 2007, 10:05 AM
Hi,
I want to print a file from 25th line to till the EOF. How can i use the "head" or "tail" or similar commands?

Regards
Zoobave
http://zoobave.blogspot.com/

jyba
July 11th, 2007, 01:38 PM
I usually use sed for something like this.

sed 1,24d FILENAME

vaibhav
July 11th, 2007, 01:54 PM
Try using awk..

awk '{if (NR>24) print;}' input.txt

(Above code is untested.)

ghostdog74
July 11th, 2007, 03:50 PM
awk 'NR>24' "file"

quux
July 11th, 2007, 10:02 PM
Let me add one more...

tail -n +25 foo.txt