Posts Tagged ‘cli’

Accessing the clipboard from OS X command-line

Posted by michael on April 22nd, 2009 under OS X
Tags:  •  3 Comments

pbcopy and pbpaste are the OS X alternatives to the POSIX tool xclip.
pbcopy takes the standard input and places it in the specified paste-board. If no pasteboard is specified, the general pasteboard will be used by default.
pbpaste removes the data from the pasteboard and writes it to the standard output.
For example:
user@host:~/Projects/some/dir/that/is/long$ pwd | pbcopy
The working [...]