copy file contents from terminal code example
Example 1: copy content file from terminal
pbcopy < ~/.ssh/id_rsa.pub
Example 2: copying the contents of a file to another in terminal
cat file > anotherfile
pbcopy < ~/.ssh/id_rsa.pub
cat file > anotherfile