xsel is a quick hack to give access to the X selection from the command line.
You can paste stuff from the X selection to stdout and copy stuff from stdin
to X selection.

WWW: http://www.niksula.cs.hut.fi/~vherva/xsel/
