mkdir bin
cd /bin
nano whatismyip.sh
#!/bin/bash
echo Your external IP Address is :
#wget http://www.whatismyip.com -O - -o /dev/null | grep '<TITLE>' | sed -r 's/<TITLE>WhatIsMyIP\.com \- //g' | sed -r 's/<\/TITLE>//g'
wget http://automation.whatismyip.com/n09230945.asp -O - -o /dev/null
echo
exit 0
press ctrl+o
press enter
press ctrl+x
chmod u+x
to run :
/bin/./whatismyip.sh
ref : http://ubuntuforums.org/showthread.php?t=526176
No comments :
Post a Comment