[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cut -DF
From: |
Rob Landley |
Subject: |
Re: cut -DF |
Date: |
Sat, 15 Jan 2022 21:55:15 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
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
- Re: cut -DF, (continued)
- Re: cut -DF, Shehu Dikko, 2022/01/15
- Re: cut -DF, Pádraig Brady, 2022/01/15
- Re: cut -DF, Shehu Dikko, 2022/01/15
- Re: cut -DF,
Rob Landley <=
- Re: cut -DF, Assaf Gordon, 2022/01/25
- Re: cut -DF, Rob Landley, 2022/01/25
- Re: cut -DF, Pádraig Brady, 2022/01/25
- Re: cut -DF, Rob Landley, 2022/01/25
- Re: cut -DF, Pádraig Brady, 2022/01/25