1
1
I'd like to be able to pipe output of commands from the terminal to OS X's clipboard just like I can do to pipe output of commands to files with the >
operator (cat file.txt > file2.txt
).
Is there any way to do this?
1
1
I'd like to be able to pipe output of commands from the terminal to OS X's clipboard just like I can do to pipe output of commands to files with the >
operator (cat file.txt > file2.txt
).
Is there any way to do this?
4
pbcopy
does what you want.
http://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pbcopy.1.html
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.