Mac command line gold!
Copy a file to the clipboard:
$ cat ~/.zshrc | pbcopy
The contents of my .zshrc are now on the clipboard and I can paste them into any other application (Mail.app, Word, whatever).
Paste the clipboard contents to the shell:
$ pbpaste > foo.txt
Anything that was on the clipboard is now in the file foo.txt.