2 ms·awk can do something like negative indexes if needed: $ echo "a b c" | awk '{print $(NF-1)}' bby tyingq 4y agoawk can do something like negative indexes if needed: $ echo "a b c" | awk '{print $(NF-1)}' b