A friendly online stranger just taught me how to do something that has been plaguing me for some time. Ever since I learned how to use pipes in the unix commandline, I have wanted to know how to pipe the output of a command into the system clipboard.
For example, the echo command simply repeats whatever you tell it to. So if I run
echo hellohello
For example, if I run:
echo hello | helloprogram
Anyway, if you want to route standard output into the system clipboard, you will need to install an application called xclip. Once that is installed, a command such as:
echo hello | xclip -i -selection clipboard
will put the word hello into the clipboard. Ctrl + V will then paste that value into whatever application desired.
Thanks to aaron at http://www.cyberciti.biz/faq/linux-copying-with-middle-mouse-button/#comment-38676 for help with this question.
Post new comment