Re: cut -DF

2022-01-25 Thread Pádraig Brady
On 25/01/2022 22:50, Rob Landley wrote: On 1/25/22 3:39 PM, Pádraig Brady wrote: On 25/01/2022 07:55, Assaf Gordon wrote: Hello, Here's an updated patch for "cut -DF". Since it's a new code path, it opens the possibility of finally supporting multibyte characters with

Re: cut -DF

2022-01-25 Thread Rob Landley
On 1/25/22 3:39 PM, Pádraig Brady wrote: > On 25/01/2022 07:55, Assaf Gordon wrote: >> Hello, >> >> Here's an updated patch for "cut -DF". >> Since it's a new code path, it opens the possibility of finally >> supporting multibyte charac

Re: cut -DF

2022-01-25 Thread Pádraig Brady
On 25/01/2022 07:55, Assaf Gordon wrote: Hello, Here's an updated patch for "cut -DF". Since it's a new code path, it opens the possibility of finally supporting multibyte characters with "cut -c". comments very welcomed, - assaf [PATCH 01/18] cut: s

Re: cut -DF

2022-01-25 Thread Rob Landley
On 1/25/22 1:55 AM, Assaf Gordon wrote: > Hello, > > Here's an updated patch for "cut -DF". > Since it's a new code path, it opens the possibility of finally > supporting multibyte characters with "cut -c". Don't forget -nb (posix!). Toybo

Re: cut -DF

2022-01-25 Thread Assaf Gordon
Hello, Here's an updated patch for "cut -DF". Since it's a new code path, it opens the possibility of finally supporting multibyte characters with "cut -c". comments very welcomed, - assaf [PATCH 01/18] cut: set-fields: add no-sort options [PATCH 02/18]

Re: cut -DF

2022-01-15 Thread Rob Landley
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

Re: cut -DF

2022-01-15 Thread Shehu Dikko
* 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

Re: cut -DF

2022-01-15 Thread Pádraig Brady
regex -O Output delimiter (default one space for -F, input delim for -f) This lets you do: $ echo one two three four five six seven eight nine | cut -DF 7,1-3,2 seven one two three two Nice to see that one can specify a range of fields which is not something that is as straigtforward

Re: cut -DF

2022-01-15 Thread Shehu Dikko
t delimiter (default one space for -F, input delim for -f) > > This lets you do: > > $ echo one two three four five six seven eight nine | cut -DF 7,1-3,2 > seven one two three two Nice to see that one can specify a range of fields which is not something that is as straigtforward w

Re: cut -DF

2022-01-07 Thread Rob Landley
On 1/7/22 9:06 AM, Pádraig Brady wrote: > I'm not sure about the --allow-duplicates long option for -D, > as the duplicate aspect is not the only or even the most important > aspect of that mode. I do like it matches the "-D", though I > don't like "-D" was used for this as I mentioned previously.

Re: cut -DF

2022-01-07 Thread Rob Landley
On 1/6/22 5:02 PM, Assaf Gordon wrote: > Hello, > > On 2022-01-06 7:35 a.m., Pádraig Brady wrote: >> Thanks for taking the time to consolidate options/functionality >> across different implementations.  This is important for users. >> Some notes below... >> >> On 05/01/2022 16:23, Rob Landley

Re: cut -DF

2022-01-07 Thread Pádraig Brady
On 06/01/2022 23:02, Assaf Gordon wrote: Hello, On 2022-01-06 7:35 a.m., Pádraig Brady wrote: Thanks for taking the time to consolidate options/functionality across different implementations.  This is important for users. Some notes below... On 05/01/2022 16:23, Rob Landley wrote: Around 5 ye

Re: cut -DF

2022-01-06 Thread Assaf Gordon
Hello, On 2022-01-06 7:35 a.m., Pádraig Brady wrote: Thanks for taking the time to consolidate options/functionality across different implementations.  This is important for users. Some notes below... On 05/01/2022 16:23, Rob Landley wrote: Around 5 years ago toybox added the -D, -F, and -O op

Re: cut -DF

2022-01-06 Thread Pádraig Brady
tions or match -fF lines without delimiter -F Select fields separated by DELIM regex -O Output delimiter (default one space for -F, input delim for -f) This lets you do: $ echo one two three four five six seven eight nine | cut -DF 7,1-3,2 seven one two three two -F is a regex ve

Re: cut -DF

2022-01-05 Thread Rob Landley
On 1/5/22 2:19 PM, Assaf Gordon wrote: >> This is working and in use in Android, and now in busybox, and it would >> simplify >> my regression test suite if coreutils was in sync, so I thought I'd ask if >> you >> were interested. >> > > I personally like the idea (at the very list "-D" will in

Re: cut -DF

2022-01-05 Thread Assaf Gordon
Hello Rob and all, On 2022-01-05 9:23 a.m., Rob Landley wrote: Around 5 years ago toybox added the -D, -F, and -O options to cut: -D Don't sort/collate selections or match -fF lines without delimiter -F Select fields separated by DELIM regex -O Output delimiter (default one s

cut -DF

2022-01-05 Thread Rob Landley
e two three four five six seven eight nine | cut -DF 7,1-3,2 seven one two three two -F is a regex version of -f (defaulting to "match a run of whitespace") -D says to show the raw matches in the order requested (and ONLY those matches, it doesn't pass through lines with no ma