Command-line tool for getting and setting X selection clipboard
Command-line program for getting and setting the contents of the X selection
xsel
$ echo 'Hello World' | xsel -b
$ xsel -b
$ cat filename.txt | xsel -b