GNU bug report logs -
#8070
cut command
Previous Next
Full log
Message #10 received at 8070-done <at> debbugs.gnu.org (full text, mbox):
George Gallen wrote:
> I'm not sure whether this is a bug or not.
>
> On Redhat Enterprise Linux, the cut command will accept the following " cut -c0-5 " (Cut ver 5.97)
> On Fedora it will not accept the 0, it must be " cut -c1-5 " (cut ver 8.5)
>
> Although both are functionally the same, they seem to only return 5 characters
> The script it was written in worked without problems from Redhat 7.2 to present RHEL
> I only noticed the problem with fedora 13 and 14.
>
> I was able to copy the cut command from RHEL to Fedora 14 and it works fine. What am losing
> between these two versions?
>
> Was there a divergence somewhere along the way where cut stopped tolerating the
> the 0 base index?
Right. That change was due to a bug fix.
Here's part of coreutils' NEWS file:
* Noteworthy changes in release 6.9.91 (2007-12-15) [beta]
cut now diagnoses a range starting with zero (e.g., -f 0-2) as invalid;
before, it would treat it as if it started with 1 (-f 1-2).
"cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
This bug report was last modified 14 years and 96 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.