2 ms·
I like awk very much, but cut has one big advantage over awk - you can easily output range of fields also open ended ones. Example: $ cat foo foo bar baz
by hawski 8y ago
I like awk very much, but cut has one big advantage over awk - you can easily output range of fields also open ended ones. Example:
$ cat foo
foo bar baz
foo qux
$ < foo cut -d' ' -f 2-
bar baz
qux
As far as I know you have to loop through the fields, which is (haha) awkward.