WAN IP address to clipboard (KDE only!)
30 oktober 2006
Often I want to copy/paste my WAN IP address, here is a shellscript for it (warning: kde only, requires wget and sed, no error detecting whatsoever!)
-
#!/bin/bash
-
ip=$(wget -q -O – http://checkip.dyndns.org/ | sed ‘s/.+ (([[:digit:]]{1,3}.){3}[[:digit:]]{1,3}).+/1/’)
-
dcop klipper klipper setClipboardContents $ip
-
echo $ip
Categorieën:Linux Tips & Trics