pictures

Copy to Clipboard in the Command Line Interface (CLI)

hr
hr Heading 2 Icon Copy to Clipboard in the Command Line Interface (CLI)

Ever wonder how to copy something from the command line into the Mac OS clipboard? If you want to copy/paste a files content (perhaps a log file or a conf file, etc) into the clipboard to use outside of the CLI, you can use the commands pbcopy and pbpaste. Example: I want to copy the contents of my public key to the clipboard (so I can send it to a server admin who will use it in allowing me to access their subversion repository).

All I would need to do is:
cat id_dsa.pub | pbcopy

(cat writes out the content and then it is piped (|) into the clipboard) This comes in handy!

late night…

hr
hr Heading 2 Icon late night…

I know I am working too late when my menu bar eyeballs are bloodshot. (I have been carrying around this “Extension” since Mac OS 7.)


search

subscription information

Blog RSS

Comments RSS



Powered by FeedBlitz

blog categories

blog tags

most popular posts


blog archive

standards

Get Firefox!
XHTML
CSS