Monday, June 27, 2011

Cat to or from clipboard in Terminal

On a Mac, man pbcopy or pbpaste to see how to redirect into or out of your pasteboard/clipboard. With pbpaste, -Prefer txt can be useful to ensure ascii output.

cat file.txt | pbcopy
pbpaste -Prefer txt > out.txt


Yay.

No comments:

Post a Comment