mac copy file content to clipboard in terminal 2020-12-16 07:41

Use following command to copy file content to clipboard.

$ cat test.txt |pbcopy

After executing the above command the content of text.txt is copied to clipboard. You can use `command + v' to paste it.

EOF