Comment 2 for bug 211262

Revision history for this message
Mike Perry (mike.perry) wrote :

I agree, this change in behavior will affect third party scripts that were written for generic flavors of Linux. Although the old behavior may not have been "correct" it was accepted and widely used. I'd also like to point out that the behavior of -f was changed as well.

This was discovered while testing a Sybase ASA install on Hardy. The Sybase installation script uses the following to detect diskspace:

df -kP | sed 1d | tr -s ' ' | cut -d" " -f,4

Which in Hardy would return something like:
53217452
1552976
1553244
1553124
1553124
1553244
124355

Running the same command in Hardy causes the following error:
cut: fields and positions are numbered from 1
Try `cut --help` for more information.

I would like to see this bug reconsidered, as there are no alternatives for third party scripts. In fact changing changing the script to "-f1,4" is a different behavior than "-f,4". The cut command should have some way of restoring backwards compatibility in some manner, be it an environment variable, /etc/alternatives, or something else.