All pastes #840521 Raw Edit

Miscellany

public text v1 · immutable
#840521 ·published 2007-12-31 23:22 UTC
rendered paste body
Make new file called whatismyip.sh

put the following in the file.

#!/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'

exit 0

chmod +x whatismyip.sh after you save the file and run it like so ./whatismyip.sh