In several occasions I find myself catting some file and then having to select the entire text with the mouse. If I want to keep my hands on the keyboard, I have to do a, , , .
Well, I found a way to do it faster and nicer simply by piping to the clipboard, thanks to.
To use it, just install it and configure an alias in yourfile, as follows:
$ sudo apt-get install xclip
$ alias clipboard='xclip -selection clipboard'
Then, when you need to do something like configuring your SSH key in GitHub, you just:
$ cat ~/.ssh/id_rsa.pub | clipboard