LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   LAN address in an environment variable somewhere? (https://www.linuxquestions.org/questions/linux-networking-3/lan-address-in-an-environment-variable-somewhere-379316/)

bcfriesen 11-02-2005 12:39 PM

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.

Back_to_Linux 11-02-2005 02:40 PM

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.