Bernhard Voelker wrote:

> Hi Marcel,
>
> On 11/16/2012 07:35 AM, Marcel Böhme wrote:
>>    Hi,
>>    The command "echo 12345 | cut -b 0-" prints an empty line while it
>>    should fail with "fields and positions are numbered from 1" according
>>    to this specification "cut: diagnose a range starting with 0 (-f 0-2)
>>    as invalid".
>>    Can you confirm this is an incomplete bugfix made on 2007-05-22?
>
> I'd say yes.
> Here's a proposed fix.
...
> Subject: [PATCH] cut: do not accept the range 0-
>
> * src/cut.c (set_fields): Add a diagnostic for the invalid open
> range which start with Zero, i.e., the range 0-.
> * tests/misc/cut.pl: Add a test to ensure the range 0- fails.
> * Mention the fix.
>
> Reported by Marcel Böhme.

Thank you!
That change looks fine, at first glance,
but please amend the log to mention the bug number URL.
Also, technically this is a bug, so please mention the
fix in NEWS.

Send a request in savannah, and tonight or tomorrow I'll
give you push-after-approval access.



Reply via email to