LAN address in an environment variable somewhere?
I'm currently at a university and I've set up an FTP server on my computer for some of my friends to use. Unfortunately, the campus DHCP server assigns me a new LAN IP address almost every time I reboot the computer. So, I'm writing a boot-up script that automatically sends an e-mail to some of my friends with my new IP address. I've already written the part of the script that actually sends the e-mail, so all I need to do now is figure out how to save my current LAN address in a text file. Is there some variable it's stored in?
Thanks in advance. |
try ifconfig with awk and cut
or, "ping -I (interface) www.google.fr", and you obtain your ip after the from word in the first line |
All times are GMT -5. The time now is 02:00 AM. |