Reversing your clipboard
Have you ever had a list in a website that you wanted to reverse the order and paste into a spreadsheet? With the CLI, it’s easy:
Copy the list into your clipboard. Try it with the example here:
3 2 1
Make sure you have pbcopy and pbpaste
Use tac to invert the clipboard
pbpaste | tac | pbcopy
Now paste and you should see
1
2
3