pbcopy

Copy data from STDIN to the clipboard.

Syntax
      pbcopy  [-pboard {general | ruler | find | font}]

Key
   -pboard  Specify a pasteboard to copy to.
            By default the general pasteboard.

Takes the standard input and places it in the specified pasteboard. If no pasteboard is specified, the general pasteboard will be used by default.

The input is placed in the pasteboard as ASCII data unless it begins with the Encapsulated PostScript (EPS) file header or the Rich Text Format (RTF) file header, in which case it is placed in the pasteboard as one of those data types.

Example

# Copy the output of a command to the clipboard:
$ grep 'search term' myfile.txt | pbcopy

"God shows his contempt for wealth by the kind of person he selects to receive it" - Austin O'Malley

Related:

pbcopy man page - Apple.com
pbpaste Paste data from the Clipboard
printenv - Print environment variables



Back to the Top

© Copyright SS64.com 1999-2012
Some rights reserved