XClip

Get data from clipboard

To get the data from the clipboard do the following command:

$xclip -sel clip -o

To put data into the clipboard, do:

$echo "Something" | xclip -sel clip

To process the whatever is on the clipboard and put it back in:

$xclip -sel clip -o | sed -e "s/whatever/nothing/g" | xclip -sel clip