Sometimes I need to copy whole output of some program into my clipboard or selection. I use nice Gnome Shell extension called Gpaste (packages gpaste and gnome-shell-extension-gpaste in Fedora and Red Hats). It is a nice daemon, command line tool and Gnome Shell menu, everything well integrated.

And how to do that? It is easy. Just pipe it through the gpaste command, I am not kidding.

$ echo "Some very long output" | gpaste

The long test is now in your selection or clipboard (according to your gpaste configuration). That's it :-)