commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
bash output is inserted into the clipboard, then mousepad is started and the clipboard content is pasted. xsel and xdotool needs to be installed. Instead of the mousepad any other editor can be used. I've successfully tested the Sublime Text Editor and it opens a new tab for each new paste. Check Sample output for a usage example. This command is originated from here - http://goo.gl/0q9UT4
This command will copy command's output into your local clipboard
Translate the X selection from German to English. The tw program is available from Savannah: http://mirror.its.uidaho.edu/pub/savannah/twandgtw/
I'm posting this because the base Debian system also does not include curl.
Uses google api to translate, you can modify the language in which translate modifying the parameter "langpair=|en", the format is language input|language output.
The function will take a comma separated list of items to be 'selected' by xsel -i:
smenu "First item to paste,Paste me #2,Third menu item"
You will then be prompted to choose one of the menu items. After you choose, you will be able to paste the string by clicking the middle mouse button.
The menu will keep prompting you to choose menu items until you break out with Control-C.
Set up X forwarding in PuTTY, with X display location set to :0.0
Launch PuTTY ssh session.
Launch Xming. Make sure that display is set to :0.0 (this is default).
echo "I'm going to paste this into WINDERS XP" | xsel -i
will insert the string into the windows cut and paste buffer.
Thanks to Dennis Williamson at stackoverflow.com for sharing...
In turn you can get the contents of your clipboard by typing xsel by itself with no arguments:
This command requires you to install the xsel utility which is free