


The best way to use it is by piping something into pbcopy, for example:

This is basically like using Comamnd+C in the Finder or GUI of OS X. Pbcopy – as you might imagine, pbcopy is how you can copy things from the command line. Adding Contents to the Clipboard with pbcopy You can double-check this by opening it in any text editor, or by typing cat clipboard.txt to see the contents. Now you’ll have the document clipboard.txt with the contents of your clipboard. You can also easily store the contents of the clipboard into a file by using pbpaste, as follows: You’ll see whatever is stored in the clipboard right now, as if you hit Command+V in OS X. If you just want to see what’s in the clipboard, simply type this: Pbpaste – pbpaste is how you dump the currently active contents of the clipboard. Accessing the OS X Clipboard Contents with pbpaste
