On 1/15/22 6:20 AM, Shehu Dikko wrote: > * Pádraig Brady [2022-01-15] [gmane.comp.gnu.coreutils.general]: >> On 15/01/2022 08:44, Shehu Dikko wrote: >>> [....] >>> $ echo one two three four five six seven eight nine | cut -DF 1,5-$ >>> one five six seven eight nine >>> >>> Do please also add the undocumented feature to cut. >>> [..] >> >> Open ended ranges are already supported by coreutils cut: >> >> $ echo one two three four five six seven eight nine | cut -d ' ' -f 1,5- >> one five six seven eight nine >> >> I don't think we need to support an explicit '$' for this. > > Noted. I didn't want to see it overlooked in the context of the -DF.
Unterminated ranges are already supported by toybox and busybox cut. It's a posix requirement: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cut.html The -D option is "Don't reorder" and -F is "regex match" defaulting to a run of one or more whitespace characters. (And since emitting a regex as the default output delimiter is silly, -F makes the default --output-delimiter be a single space. -O is just a short opt for the existing --output-delimiter.) The rest of the behavior is what cut was already doing. Rob