Quick tip: Manipulating the OS X clipboard

Here’s a shortcut that comes in handy sometimes. There are two command-line utilities, pbcopy and pbpaste that provide direct access to the OS X clipboard.

They’re quite useful for doing various quick things with clipboard contents, like, say, writing it to a file:

pbpaste > Desktop/output.txt

Or altering them:

pbpaste | sed s/bacon/bea-con/g | pbcopy


. Bookmark the permalink. Both comments and trackbacks are currently closed.