Using the X11 clipboard on the commandline XSel gives easy commandline access to the X11 clipboard (primary & secondary).