0

I have a long string of text saved in a file that I want to easily copy to clipboard using Os X 10.11 terminal

  • Create an [Automator task for a Shell Script](http://stackoverflow.com/questions/281372/executing-shell-scripts-from-the-os-x-dock) that runs `pbcopy < name-of-template-file`. Then map that to a key. – kba Feb 18 '16 at 17:34

1 Answers1

0
pbcopy < myfile.txt

or

cat myfile.txt | pbcopy

See man pbcopy and man pbpaste.

(This is specific to Mac OS X; for Linux there are other similar commands.)

Wildcard
  • 35,316
  • 26
  • 130
  • 258