I was just wondering if I could ‘cat’ something to clipboard from the terminal on the Mac, and you can!
Open a terminal and do:
$ cat ~/Desktop/ded.html | pbcopy
Now that file is in the clipboard.
To put it somewhere else, that is, to paste it, do:
$ pbpaste > ~/Documents/ded.html
Now you should have a copy of ded.html sitting in ~/Documents.