NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59029: cut(1) -n argument doesn't work (presently unsupported, though documented)
>Number: 59029
>Category: bin
>Synopsis: cut(1) -n argument doesn't work (presently unsupported, though documented)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 24 22:20:00 +0000 2025
>Originator: David H. Gutteridge
>Release: current
>Organization:
TNF
>Environment:
>Description:
The -n argument of cut(1) doesn't work; it's unimplemented. It is
documented in the man page and usage(), but code inspection shows it
was never actually implemented in NetBSD's version of the command.
(There's a comment in cut.c that says
/* Since we don't support multi-byte characters, the -c and -b
options are equivalent, and the -n option is meaningless. */
though that's not actually correct, as multi-byte characters have been
supported since 2007. But -n support simply wasn't added then.)
>How-To-Repeat:
Try to use "cut -b X,Y,Z -n foo.txt" on a file with an encoding that
supports multi-byte characters and happens to have some around the
boundaries.
>Fix:
Add missing functionality to cut(1). TBD. (FreeBSD and OpenBSD have it.)
Home |
Main Index |
Thread Index |
Old Index