LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-02-2005, 12:39 PM   #1
bcfriesen
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 7.10
Posts: 16

Rep: Reputation: 0
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.
 
Old 11-02-2005, 02:40 PM   #2
Back_to_Linux
Member
 
Registered: Sep 2005
Location: PARIS
Distribution: Mandriva 10.0 Communoty
Posts: 117

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
environment variable gamor Linux - Newbie 4 04-30-2005 05:28 PM
environment variable definition skwattakamp Fedora 4 07-23-2004 11:17 PM
Environment Variable salmanucit Linux - Software 2 07-21-2004 02:27 AM
environment variable mimi Linux - Newbie 1 04-10-2002 08:29 AM
environment variable mimi Linux - General 2 04-10-2002 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration