removing the first 10 lines of a file

Ernst de Haan znerd at FreeBSD.org
Fri Jan 9 08:20:53 PST 2004


You could do something like this:

tail -n `echo \`wc -l in\` | awk '{print $1 " - 10" }' | bc` in > out

where 'in' is the name of the input file and 'out' the name of the generated 
file... but I'm sure there's probably a nicer and shorter way :-)

Ernst

On Friday 09 January 2004 16:07, Dru wrote:
> I remember coming across a trick (which I can't find now) which allowed
> you to page all of a file, except for the first 10 lines. I think it used
> a combo of head and tail to achieve this. I can't just use tail as the
> length of the file varies whereas the amount I don't want to see doesn't.
>
> Anyone know of a quick way to do this?
>
> Dru
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list