.\"Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. .\"" .TH PBCOPY 1 "January 12, 2005" "Apple Computer, Inc." .SH NAME \fBpbcopy\fR, \fBpbpaste\fR \- provide copying and pasting to the pasteboard (the Clipboard) from command line .SH SYNOPSIS .B pbcopy [\fB-help\fR] [\fB-pboard\fR {\fBgeneral\fR | \fBruler\fR | \fBfind\fR | \fBfont\fR}] .PP .B pbpaste [\fB-help\fR] [\fB-pboard\fR {\fBgeneral\fR | \fBruler\fR | \fBfind\fR | \fBfont\fR}] [\fB-Prefer\fR {\fBtxt\fR | \fBrtf\fR | \fBps\fR}] .SH DESCRIPTION .B pbcopy 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 plain text 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. .PP .B pbpaste removes the data from the pasteboard and writes it to the standard output. It normally looks first for plain text data in the pasteboard and writes that to the standard output; if no plain text data is in the pasteboard it looks for Encapsulated PostScript; if no EPS is present it looks for Rich Text. If none of those types is present in the pasteboard, \fBpbpaste\fR produces no output. .PP * Encoding: .PP \fBpbcopy\fR and \fBpbpaste\fR use locale environment variables to determine the encoding to be used for input and output. For example, absent other locale settings, setting the environment variable LANG=en_US.UTF-8 will cause \fBpbcopy\fR and \fBpbpaste\fR to use UTF-8 for input and output. If an encoding cannot be determined from the locale, the standard C encoding will be used. Use of UTF-8 is recommended. Note that by default the Terminal application uses the UTF-8 encoding and automatically sets the appropriate locale environment variable. .SH OPTIONS .TP .B \-pboard {general | ruler | find | font} specifies which pasteboard to copy to or paste from. If no pasteboard is given, the general pasteboard will be used by default. .TP .B \-Prefer {txt | rtf | ps} tells .B pbpaste what type of data to look for in the pasteboard first. As stated above, .B pbpaste normally looks first for plain text data; however, by specifying .B -Prefer ps you can tell .B pbpaste to look first for Encapsulated PostScript. If you specify \fB-Prefer rtf\fR, .B pbpaste looks first for Rich Text format. In any case, .B pbpaste looks for the other formats if the preferred one is not found. The txt option replaces the deprecated ascii option, which continues to function as before. Both indicate a preference for plain text. .SH SEE ALSO .B ADC Reference Library: .br Cocoa > Interapplication Communication > Copying and Pasting .br Carbon > Interapplication Communication > Pasteboard Manager Programming Guide .br Carbon > Interapplication Communication > Pasteboard Manager Reference .SH BUGS There is no way to tell .B pbpaste to get .I only a specified data type.