bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17637: bug "cut of end-line is skipped"


From: Eric Blake
Subject: bug#17637: bug "cut of end-line is skipped"
Date: Thu, 29 May 2014 16:53:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/29/2014 04:24 PM, Pádraig Brady wrote:
> tag 17637 notabug
> close 17637
> stop

On the one hand, this feels a bit premature.

> 
> That change 
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=51ce0bf8
> was made in v8.21 to fix http://bugs.gnu.org/13498

Are you sure you didn't mean the next commit:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d302aed

But both of those commits are in coreutils 8.21, whereas the Fedora 20
build of coreutils 8.21 does not have that behavior.  Is downstream
patching things in a way to make it work, and if so, why can't we
backport what Fedora has added on top?

> 
> It was made for a good reason, to handle the buffering issues detailed
> in the above bug. Your existing usage was a bit of an edge case and not
> supported with other cut implementations, and while we try to avoid
> changes like this it was thought the benefits outweighed the impact
> for the very few who use cut in this way.

But while you documented the improved buffering behavior in NEWS, you
failed to document the corner-case change to -d$'\n'.

On the other hand, I confirmed that both Solaris and FreeBSD cut behave
the same way as the new GNU cut behavior.

$ nl='
'
$ printf 'a\t1\nb\t2\n' | cut -d"$nl" -f1
a       1
b       2

So keeping the new behavior in the name of consistency makes sense,
although it still might be nice to add a retroactive NEWS entry.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]