pbpaste

Paste data from the clipboard to STDOUT.

Syntax
      pbpaste [-pboard {general | ruler  |  find  |  font}]
                 [-Prefer  {ascii | rtf | ps}]

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

   -Prefer  Specify the type of data to look for in the pasteboard.
            (pbpaste normally looks first for  ASCII data)
            In any case, pbpaste looks for the other formats if the preferred one is not found.

pbpaste will remove data from the clipboard/pasteboard and write it to the standard output.

It normally looks first for ASCII data in the clipboard and writes that to the standard output; if no ASCII data is in the pasteboard it looks for Encapsulated PostScript; if no EPS if present it looks for Rich Text. If none of those types is present in the pasteboard, pbpaste produces no output.

Examples

Replace spaces in the clipboard text with %20

$ pbpaste | sed 's/ /%20/g'

Look first for RTF:
$ pbpaste -Prefer RTF

“Failure is not fatal, but failure to change might be” - John Wooden

Related:

pbpaste man page - Apple.com
pbcopy - Copy data to the clipboard
printenv - Print environment variables



Back to the Top

© Copyright SS64.com 1999-2012
Some rights reserved