Archiv

Archiv für Juli, 2009

From bash to clipboard in X

4. Juli 2009 Keine Kommentare

I recently had the workflow of opening a file in an editor, copying its content just to paste it into
another one. There had to be another way to do this. It was xclip. With xclip you can insert ‚things‘ from Stdin or from a file!

xclip -i file.txt inserts the content from file.txt into the clipboard from X!

It does naturally also work the other way round. with xclip -o you insert the content of the X clipboard into the current bash-shell. Comes in handy for scripting 😉

KategorienWeb Tags: