Copy to Clipboard Shell Command

Here is a neat OSX Terminal tip. You can pipe command line output to the system clipboard by using the pbcopy command. To see it in use, open Terminal then type:

ls -al | pbcopy

Then open your favorite text editor and press command-v. The output from the command you typed is now pasted into your text document!

One Response to “Copy to Clipboard Shell Command”

  1. yuletide said on August 3rd, 2007 at 10:42 pm

    Sweet! Thanks for the tip :-)