[Nottingham] [Talk] ***TODAY*** Wed 19/10/2005 Voice over IP {ML}
Michael
perl at tecspy.com
Wed Oct 19 18:22:10 BST 2005
Robert Hart wrote:
>>That's what tail is for :)
> No it's not. Try this:
>
> seq 1 20 > tmp.txt
> head -2 tmp.txt
> tail -2 tmp.txt
> tail +2 tmp.txt
> head +2 tmp.txt #this doesn't do what you think it does.
> head -$((`wc -l<tmp.txt`-2)) tmp.txt #but this does.
>
> See what I mean?
My bad! You seem to have coped OK though. I'm not familiar with the
source for head, except under busybox where it is severely limited in
functionality! Perhaps there's a particular design constraint (remember
the debates over "ls considered harmful"?).
Regards,
Michael Erskine.
More information about the Nottingham
mailing list