There's a nice litte program called xsel. It lets you access the X Window System selection and clipboard from the command line. It is incredibly useful for a Unix geek like me.

$ xsel|grep -i error

The above shows me all the lines that mention 'error' from my selection. Useful when a command produces oodles of output after several minutes of intense computation, and you realize that you should've redirected the output to a file.