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!). Toybox's rounds down to the start of character for
both beginning and end of range. (So left edge is increased, right edge is
decreased.)
One comment:
+The @option{-F} option implies @option{-s}.
In toybox and busybox -D implied -s. -F worked exactly like -f, just with
regexes.
-D disables the reordering and line suppression so cut works like other tools:
$ echo -e 'alpha\nping\nbeta\ngamma' | sed 's/a//g'
lph
ping
bet
gmm
$ echo -e 'alpha\nping\nbeta\ngamma' | tr a x
xlphx
ping
betx
gxmmx
$ echo -e 'alpha\nping\nbeta\ngamma' | nl -bpa
1 alpha
ping
2 beta
3 gamma
Rob