head.c is too complicated for a newbie to grasp at first glance. I
suggest splitting the all but last N lines feature (head -n +$n)
into a seperate source file, and preferably a seperate binary as well.
On 02/23/2011 11:56 AM, Bjartur Thorlacius wrote:
head.c is too complicated for a newbie to grasp at first glance. I
suggest splitting the all but last N lines feature (head -n +$n)
into a seperate source file, and preferably a seperate binary as well.
Thanks for the suggestion; however, I
On 23/02/11 03:31, Chris Mason wrote:
I've got a fix for this on the btrfs side in testing. It is definitely
a btrfs bug.
[resend]
Cool.
I'm closing this ticket, so.
Interesting I didn't notice this with kernel-2.6.38-0.rc4.git0.2.fc15.i686
(with a 1G loop back BTRFS on ext4)
I'd appreciate
% echo | head -n2 echo bug
bug
This bit me when writing a line oriented prompter (which would `while
head -n1`).
FYI, this also applies to FreeBSD head.
On 02/23/2011 11:58 AM, Bjartur Thorlacius wrote:
% echo | head -n2 echo bug
bug
This bit me when writing a line oriented prompter (which would `while
head -n1`).
FYI, this also applies to FreeBSD head.
That's because this is not a bug, but a POSIX requirement:
Maybe we should modify tac to add the -z option. Would you care to write a
patch?
It would be redundant, as tac -s $'\0' is equivalent.
If you want to switch between newline characters dynamically (a bad
idea, IMO) you could edit libc/stdio-common/getline.c to pass read in
the newline