If I do either of:
printf 'a\0b' | xsel
printf 'a\0b' | xsel -b
printf 'a\0b' | xclip
printf 'a\0b' | xclip -selection c
and then paste from the corresponding selection (PRIMARY or CLIPBOARD) on either of:
- browser textareas
- text editors
- pipe like in
xsel | hexdump
only a gets output.
So, is it possible to store binary data on the clipboard and then paste it later? How?
I originally wanted to do this to save images to the clipboard, which would also solve: