Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Re: Related question' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Re: Related question
Authored by: Darkshadow on Sep 05, '01 09:46:59PM
I don't know how to get the address directly, but I know of a way. If you use PPP, you can use this to get the IP:
  • netstat -nI ppp0 | while read a b c d e; do echo $d | grep [.]; done (There should be a forward slash before the dot there, but the board edited it out)
If you use something via Ethernet, you can do this one:
  • netstat -nI en0 | while read a b c d e; do echo $d | grep -v [A-z]; done
(I use PPP, so the second one is largely untested. It'll work fine as long as whatever method you are signing on with actually changes the ethernet port's IP address) Note that those are capital i's, not lowercase L's (netstat -nI). You could set either of those up as a cron job to have it email the IP address to you (as long as you have sendmail working to sending to email addresses outside your local network).

[ Reply to This | # ]