Subject: bug#12966: closed (Re: bug#12966: cut: Problems with overlapping, open-ended ranges)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 25 Nov 2012 15:53:02 +0000

Your bug report

#12966: cut: Problems with overlapping, open-ended ranges

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
12966: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12966
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#12966: cut: Problems with overlapping, open-ended ranges
From: Jim Meyering <[email-masked]>
To: Pádraig Brady <[email-masked]>
Cc: [email-masked], Marcel Böhme <[email-masked]>
Date: Sun, 25 Nov 2012 16:50:35 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Pádraig Brady wrote:
> On 11/24/2012 07:40 PM, Jim Meyering wrote:
>
>> diff --git a/src/cut.c b/src/cut.c
>> index b464840..4219d24 100644
>> --- a/src/cut.c
>> +++ b/src/cut.c
>> @@ -514,17 +514,18 @@ set_fields (const char *fieldstr)
>>     /* Set the array entries corresponding to integers in the ranges of RP.  */
>>     for (i = 0; i < n_rp; i++)
>>       {
>> -      size_t j;
>> -      size_t rsi_candidate;
>> +      /* Ignore any range that is subsumed by the to-EOL range.  */
>> +      if (eol_range_start && eol_range_start <= rp[i].lo)
>> +        continue;
>
> looks good.

Pushed (and marked "done").
Thanks for the review.

Subject: cut: Problems with overlapping, open-ended ranges
From: "Marcel Böhme" <[email-masked]>
To: [email-masked]
Date: Fri, 23 Nov 2012 09:11:46 +0100 (CET)
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I found two (semantically related) bugs. One seems to originate in the first version. For research purposes, I would appreciate if you could confirm that the second was introduced with Coreutils 5.3.0.

1) The following bug seems to exists "since the beginning".

$echo 1234567890 | ./cut -b 2-,3,4-4,5,9-
3590
$echo 1234567890 | ./cut -b 2-,3,4-4,5,9-10
234567890

$echo 1234567890 | ./cut -b 2-10,3,4-4,5,9-
234567890

2) Can you kindly confirm that the following bug has been introduced with Coreutils 5.3.0, particularly commit http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=7380cf792aa35b9328519c5f374036d5260704cb ?

$echo 1234567890 | ./cut -b 2-,3,4-4,5 --output-delimiter="."
2.34.567890

$echo 1234567890 | ./cut -b 2-10,3,4-4,5 --output-delimiter="."
234567890

Best regards,

Marcel