Is it possible to redirect the output of your terminal in linux to the clipboard? Right now I am using Ubuntu 9.10 and I simply right click and "copy" the selected text. It would be a lot easier if I could go like this...
grep sometext myfile || clipboard
The xclip package will do this. Another similar tool that is also frequently useful is pastebinit.
Usage is simple just do something like
cat /etc/passwd | xclip
.It is also possible, to take the contents of the clipboard and use it with a command like
xclip -out | grep 'foo'
.The command doesn't work just this way:
You should use this variant to make it work:
hmm... rather long for such an easy task...