Select to clipboard at the ubuntu command line
Copying and pasting without a mouse - or programmatically - can be incredibly
challenging. Ubuntu provides an apt-get installable program
xclip which can
provide X11 clipboard access at the command line.
> echo PASTEME | xclip -sel clip
PASTEME is now in the clipboard buffer.
-selection indicates the buffer that will be used,
clipboard is the buffer that we want.
To output the value of the buffer use the
> xclip -sel clip -o PASTEME