Re: Head too greedy

2007-01-02 Thread Pádraig Brady
John Summerfield wrote: [EMAIL PROTECTED] ~]$ yes stuff | head -300 | cat -n | (head -2;tail -2) 1 stuff 2 stuff [EMAIL PROTECTED] ~]$ I presume this arises because head's reading ahead (if not head, then glibc on head's behalf), and when head's printed enough lines it simply

Re: Head too greedy

2007-01-01 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to John Summerfield on 1/1/2007 5:58 AM: In this example, the results are what I desire. However, [EMAIL PROTECTED] ~]$ yes stuff | head -300 | cat -n | (head -2;tail -2) 1 stuff 2 stuff [EMAIL PROTECTED] ~]$ I presume