Problem using xclip to output current highlighted text to stdout:
xclip -o -selection
When text is selected/highlighted in the desktop gui, it sends that text to stdout, as expected. But if I then deselect the text, and run the xclip command again, it sends to stdout the text that was last highlighted. This is happening both when I run it in a script and when I run it in a terminal.
Really, it is supposed to return nothing if there is nothing selected.
So what's going wrong?