Comment on Pretty IP Address lookupparentComments−Dejital15yAnd for the sake of convenience, alias the following to something simple like "ip": curl -L -s --max-time 10 http://ip.appspot.com | egrep -o -m 1 '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'−soult15yWhat do you need the grep for?−getsat15yProbably so you know that the output you received is definitely an IP if egrep returns 0. The script on the server could fail or return unexpected non-IP output.
Comments
And for the sake of convenience, alias the following to something simple like "ip":
What do you need the grep for?
Probably so you know that the output you received is definitely an IP if egrep returns 0. The script on the server could fail or return unexpected non-IP output.