On Tue, May 31, 2005 at 11:25:10PM +0100, Lee Braiden wrote:
>
> Since you asked, and I had wondered about this myself previously, I just
> worked it out (or, rather, stumbled across it). The following works for me:
>
> ping -c 1 hop www.google.com | grep 'bytes from' | cut -d ' ' -f 5 | cut -d
> '(' -f 2 | cut -d ')' -f 1
>
> Since the ping manpage doesn't actually seem to explain what the hop keyword
> does, I'd love to know... :)
Try this:
lynx -dump http://checkip.dyndns.org |sed -n '/Current/s/.*: \(.*\)/\1/p'
It doesn't rely on ICMP packaets, which are blocked by many ISPs and/or
network admins.
-Roberto
--
Roberto C. Sanchez
http://familiasanchez.net/~sanchezr
Attachment:
pgpK8N82JlWiz.pgp
Description: PGP signature