Noel Sequeira spewed into the ether:
Ifconfig gives the entire details. There was a thread sometime back to mail the ip address received from the modem, but i could not locate it from the archives. If someone is using it please post it on the list. Philip had written a script to this effect.
Try this one liner: /sbin/ifconfig|grep P-t-P|tr -s ' '|cut -f 4 -d ' '|tr -d adr:
This is mostly from memory, so the paramter to cut may be wrong.
To explain: /sbin/ifconfig -- get all network details grep P-t-P -- get the line containing the external ppp ip address tr -s ' ' -- convert all multiple space fields to a single space. cut -f 4 -d ' ' -- cut the fourth field using a delimiter of a space. (There is a space at the beginning, which you have to consider) tr -d adr: delete the addr: part of this field.
Devdas Bhagat
------------------------------------------------------------ Nettaxi would like to ask for your help in donations to the RED CROSS today! http://www.nyredcross.org/donate/
hello everyone,
I have a mandrake 8 system running the kde desktop.
When i try to install star office that i downloaded from the internet (.bin file) it goes in a hang.
it starts the setup, and i click on load complete and then it justs hangs the system.
I have lots of free space and a swap space of 258 MB.
Any ideas....
Thanks , Mike.
__________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/
Sometime on Sep 14, dodobh@nettaxi.com assembled some asciibets to say:
/sbin/ifconfig|grep P-t-P|tr -s ' '|cut -f 4 -d ' '|tr -d adr:
I use this:
#!/bin/bash
[ $# -lt 1 ] && DEV="" || DEV=$1 MYIP=$(/sbin/ifconfig $DEV | grep "inet addr" | cut -f2 -d: | cut -f1 -d' ') echo "$MYIP"
Which optionally takes a device name on the command line. If no device is specified, shows IPs of all interfaces.
Philip