Comment

Comment by BiteCode_dev

Agreed.

In fact, anybody promoting cut, please give me the cut version of:

    echo -e "foo   bar   baz" | choose -1 -2
It should work on an arbitrary number of spaces, and fields.

The oneliner is going to be... interesting.

Now you can do it with awk using:

   echo -e "foo bar baz" | awk '{ print $NF " " $(NF-1)}'
But it's neither easy to type, nor to remember.

Choose is what cut should have been.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton