There was a recent article on the Macworld main site about apps you can buy that will strip formatting from text on the clipboard, leaving you with plain text that you can paste into documents without it having the wrong font, etc.
Although some of them do this automatically, I thought it's a bit much to pay for such a simple utility that can be done in one line on the CLI.
So here's a shell script that will convert the contents of the clipboard to plain text.
#!/bin/bash # # Convert contents of clipboard to plain text. pbpaste | textutil -convert txt -stdin -stdout -encoding 30 | pbcopy exit 0
Mac OS X Hints
http://hints.macworld.com/article.php?story=20120114032406552