[Toybox] Has anybody ever actually used cut -f?
Bastian Bittorf
bb at npl.de
Fri Sep 2 01:26:24 PDT 2016
* Rob Landley <rob at landley.net> [02.09.2016 09:44]:
> In theory:
>
> echo "one two three four five" | cut -f 2-4
[...]
> As has been noted before, this makes about 90% of the uses of awk go
> away. The downside is, if you're _not_ using toybox cut, it won't work.
Dont do that. I understand the reasons, but...
what about using 'set', it already default to your
[any spaces also TABS] because of IFS. so:
set -- one two three four five; echo $2 $3 $4
i has two downsides:
1) it's not intuitive
2) it overwrites the ARGS
the plus is: it does not need a pipe and it's posix 8-) - bye, bastian
More information about the Toybox
mailing list