How to Copy and Paste a File's Contents on a Mac

To copy a file's contents to the system clipboard

cat <name and path to file>  | pbcopy

 

To paste the clipboard contents to a file:

pbpaste >> <name and path to file>