Skip to content

Script-fu: cat directly to X clipboard

by Ronnie on April 10th, 2009

Have you ever wanted to ‘cat’ a file directly to the clipboard? OF COURSE, why else would you be reading this sentence?

Simply install ‘xclip’, which is simple also, if you are on ubuntu:

sudo apt-get install xclip

Anything that you pipe to it goes to the X11 clipboard. Once there, you can just hit the middle mouse button to paste it where you want, just as if you had highlighted it. So you can do things like this:

$ cat some.file | xclip
$ nslookup somehost | xclip
$ ./runsomeawesomescriptthatyouwanttheoutputintheclipboard.sh | xclip
2 Comments
  1. Лучшая инфа которую я прочел за последние несколько дней. Очень актуально. Спасибо

  2. [url=http://al-x.3dn.ru/]Уникальные продукты – замедление процесса старения, возможность заработать в интернет на продаже уникальных мультивитаминов

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS