I needed to reverse the order of blank-separated words. `tac` comes to mind and has an `-s`-option. So I tried $ echo -e A B C D E F | tac -s' ';echo F E D C B A $ echo -e A B C D E F | tac -s' ' | tr ' ' '-';echo F E-D-C-B-A- $ where the final `echo` is to have the next prompt on a separate line and the `tr ' ' '-'` is to see any invisible blanks at the end of the output lines. What irritates me is the newline after the "F" in the output. Looks like a bug to me, is it? While writing this question and looking at the suggestions for similar questions (a **very good** feature) I saw https://unix.stackexchange.com/q/598611/268339 and learned about rev, which is exactly what I wanted. Still, for `tac`, is it a bug or a feature?