3 ms·
Doesn't seem to fix the #1 thing missing from cut: an easy syntax for splitting on whitespace sequences (rather than a single space), like awk does by default.
by donio 4y ago
Doesn't seem to fix the #1 thing missing from cut: an easy syntax for splitting on whitespace sequences (rather than a single space), like awk does by default.
(I see that it support splitting on regex but I was hoping for it to be the default or a single character switch)
- vultour 4y agoIsn’t that what the —-greedy-delimiter is for?
- donio 4y agoNice, missed that, and it has a single character shorthand too: -g Edit: or maybe not, I think I'd still have to use --regex for real whitespace sequences that can be a mix of spaces and tabs.
- riquito 4y agoAs you figured out, -g (--greedy) matches the same delimiter multiple times (e.g. one or more spaces). If you want to match different delimiters (e.g. a mix of spaces), one or more times, you must use -e (--regex).
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]