On Sun, Apr 16, 2000 at 10:13:43PM -0400, Karthik Vishwanath wrote:
> Hi,
>
> I dial to connect to my ISP and (obviously!) get a random ip#. I get it
> now by /sbin/ifconfig -a and reading the lines there. 'hostname' gives me
> the name I have given my machine. Is there any other program that I can
> run that will give me this info?
>
Nothing pops to mind, but what do you need it for? What's
wrong with ifconfig -a ? If the problem is that it's mashed
up with a bunch of other stuff, try doing:
ifconfig ppp0 | sed -n 's/.*addr:\([^ ]*\).*/\1/gp'
which will seperate out your IP from the rest of the stuff
hope this helps,
greg
--
military intelligence. portable C.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs