Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Options | 6 comments | Create New Account
Click here to return to the 'Options' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Options
Authored by: blb on Jun 27, '01 11:23:26PM

Both commands have a -help option, but that's all pbcopy seems to do. pbpaste has:

-Prefer rtf|ps|ascii



[ Reply to This | # ]
Options
Authored by: mnaj on Jun 28, '01 06:10:05PM

There are ancient commands from that let you copy and paste from the pasteboard buffer (when the prefix 'pb').
They come in real handy when doing work in Terminal.app. You can take any text and manipulate it with normal
unix commands, such as
pbpaste | grep "specific string" | sed -e 's/specific/certain/g' | mail username@domain.com.
This means you can take pbpaste between and Cocoa app and the unix command line. You can also load the
buffer thus
pbcopy <filename

Here're the manpages from when they were just copy-n-paste:

COPY(1) UNIX Programmer's Manual COPY(1)

NAME
copy, paste - provide copying and pasting from command line

SYNOPSIS
/usr/bin/copy

/usr/bin/paste [ -Prefer {ascii | rtf | ps} ]

DESCRIPTION
copy takes the standard input and places it in the
NEXTSTEP(tm) pasteboard (for more information on the paste-
board and pasteboard data types see the NeXT Developer's
Library, accessible through the NeXT Developer target of the
Digital Librarian). The input is placed in the pasteboard
as ASCII data unless it begins with the Adobe Systems Encap-
sulated PostScript file header or the Microsoft Rich Text
Format file header, in which case it is placed in the paste-
board as one of those data types.

paste removes the data from the pasteboard and writes it to
the standard output. It normally looks first for ASCII data
in the pasteboard 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, paste pro-
duces no output.

OPTIONS
-Prefer {ascii | rtf | ps}
tells paste what type of data to look for in the paste-
board first. As stated above, paste normally looks
first for ASCII data; however, by specifying -Prefer ps
you can tell paste to look first for Encapsulated
PostScript. If you specify -Prefer rtf, paste looks
first for Rich Text format. In any case, paste looks
for the other formats if the preferred one is not
found.

BUGS
There is no way to tell paste to get only a specified data
type.

$ man paste

COPY(1) UNIX Programmer's Manual COPY(1)

NAME
copy, paste - provide copying and pasting from command line

SYNOPSIS
/usr/bin/copy

/usr/bin/paste [ -Prefer {ascii | rtf | ps} ]

DESCRIPTION
copy takes the standard input and places it in the
NEXTSTEP(tm) pasteboard (for more information on the paste-
board and pasteboard data types see the NeXT Developer's
Library, accessible through the NeXT Developer target of the
Digital Librarian). The input is placed in the pasteboard
as ASCII data unless it begins with the Adobe Systems Encap-
sulated PostScript file header or the Microsoft Rich Text
Format file header, in which case it is placed in the paste-
board as one of those data types.

paste removes the data from the pasteboard and writes it to
the standard output. It normally looks first for ASCII data
in the pasteboard 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, paste pro-
duces no output.

OPTIONS
-Prefer {ascii | rtf | ps}
tells paste what type of data to look for in the paste-
board first. As stated above, paste normally looks
first for ASCII data; however, by specifying -Prefer ps
you can tell paste to look first for Encapsulated
PostScript. If you specify -Prefer rtf, paste looks
first for Rich Text format. In any case, paste looks
for the other formats if the preferred one is not
found.

BUGS
There is no way to tell paste to get only a specified data
type.



[ Reply to This | # ]