Basic usageFor the following examples it is assumed that the script is available in the search path as
gives the content of the clipboard. You can use the switch
-i 2to obtain historic contents, here item number
2, of the clipboard (note that
-i 0refers to the current content).
clip "some text"
"some text"into the clipboard.
ps | clip -
Put the output of some program, here
ps, into the clipboard.
Connect to the server whose hostname is contained in the clipboard.
Use the autocompletion of the shell to copy filenames conveniently to the clipboard.
cat todo | clip -
Copy the content of files, here
todo, to the clipboard.
|clip.py.gz||971 Bytes||clip for KDE4||746|
|clip-kde3.py.gz||977 Bytes||clip for KDE3||545|
To use the python script clip.py.gz as described above:
- unzip the file (
- rename it to clip,
- give yourself execute permission (
chmod +x clip), and
- place it in a folder, which is in the search path of the shell.
KDE3 vs. KDE4The attached clip.py.gz is using
dbusand works for KDE4. If you are still using KDE3, you can download clip-kde3.py.gz.