In each example below, the contents of a file are copied to the clipboard.
cat <file> | pbcopy
type <file> | clip