Here's another solution. One that I personally prefer.
It uses Xsel. It's very similar to Xclip but with a key difference.
$ cat my_funky_file | xsel
While Xclip puts everything in the main clipboard, Xsel manipulates the selection buffer letting you paste the selection with a middle-click. This is great for one-offs! So if you have something in your clipboard that you haven't pasted yet, that would stay unaffected!
And if you want to paste the content, xsel -o
will spit it right out.
You can install it on a debian based system using
$ apt-get install xsel
The source is available here otherwise! Hope this helps someone.