Re: ifconfig data

2009-03-01 Thread Aneurin Price
On Sun, Mar 1, 2009 at 2:25 AM, Andrew McGlashan wrote: > Hi, > > Aneurin Price wrote: >> >> On Fri, Feb 27, 2009 at 12:36 PM, Andrew McGlashan >> wrote: >>> >>> Aneurin Price wrote: Maybe this would suit you: http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php

Re: ifconfig data

2009-02-28 Thread Andrew McGlashan
Hi, Aneurin Price wrote: On Fri, Feb 27, 2009 at 12:36 PM, Andrew McGlashan wrote: Aneurin Price wrote: Maybe this would suit you: http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php (Changing eth0 to ppp0 obviously) Okay. NB. To get that example to work I had to change the i

Re: ifconfig data

2009-02-28 Thread Aneurin Price
On Fri, Feb 27, 2009 at 12:36 PM, Andrew McGlashan wrote: > Hi, > > Aneurin Price wrote: >> >> Maybe this would suit you: >> http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php >> (Changing eth0 to ppp0 obviously) > > Okay. > >> NB. To get that example to work I had to change the in

Re: ifconfig data

2009-02-27 Thread Andrew McGlashan
Hi, Aneurin Price wrote: Maybe this would suit you: http://www.geekpage.jp/en/programming/linux-network/get-ipaddr.php (Changing eth0 to ppp0 obviously) Okay. NB. To get that example to work I had to change the includes as I got it to work fine without _any_ changes. Kind Regards AndrewM

Re: ifconfig data

2009-02-20 Thread Cameron Hutchison
Tzafrir Cohen writes: >On Thu, Feb 19, 2009 at 02:02:36PM +0100, Tanco . wrote: >> Hi Hugo, >> >> this will give you the IP :) >> >> ifconfig ppp0 | grep "inet addr:" | awk '{ print $2}' | tail -c14 > ifconfig ppp0 | awk '/inet addr:/{ print $2}' | cut -d: -f2 ifconfig ppp0 | awk '/inet add

Re: ifconfig data

2009-02-20 Thread Tzafrir Cohen
On Thu, Feb 19, 2009 at 02:02:36PM +0100, Tanco . wrote: > Hi Hugo, > > this will give you the IP :) > > ifconfig ppp0 | grep "inet addr:" | awk '{ print $2}' | tail -c14 ifconfig ppp0 | awk '/inet addr:/{ print $2}' | cut -d: -f2 -- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://t

Re: ifconfig data

2009-02-19 Thread Hugo Vanwoerkom
Hugo Vanwoerkom wrote: Aneurin Price wrote: On Thu, Feb 19, 2009 at 11:43 AM, Hugo Vanwoerkom wrote: Maybe this would suit you: To explain a little: I wrote a little program that analyzes the output of apache2's access log. It puts just one message out to syslog if the server is accesse

Re: ifconfig data

2009-02-19 Thread Hugo Vanwoerkom
Aneurin Price wrote: On Thu, Feb 19, 2009 at 11:43 AM, Hugo Vanwoerkom wrote: Hi, Ifconfig says: ... ppp0 Link encap:Point-to-Point Protocol inet addr:200.57.201.43 P-t-P:200.57.219.18 Mask:255.255.255.255 ... I want that inet addr (200.57.201.43) in a program and I prefer not

Re: ifconfig data

2009-02-19 Thread Raquel
On Thu, 19 Feb 2009 13:48:12 + Aneurin Price wrote: > On Thu, Feb 19, 2009 at 11:43 AM, Hugo Vanwoerkom > wrote: > > Hi, > > > > Ifconfig says: > > > > ... > > ppp0 Link encap:Point-to-Point Protocol > > inet addr:200.57.201.43 P-t-P:200.57.219.18 > > Mask:255.255.255.255 ...

Re: ifconfig data

2009-02-19 Thread Aneurin Price
On Thu, Feb 19, 2009 at 11:43 AM, Hugo Vanwoerkom wrote: > Hi, > > Ifconfig says: > > ... > ppp0 Link encap:Point-to-Point Protocol > inet addr:200.57.201.43 P-t-P:200.57.219.18 Mask:255.255.255.255 > ... > > I want that inet addr (200.57.201.43) in a program and I prefer not to run

Re: ifconfig data

2009-02-19 Thread Tanco .
Hi Hugo, this will give you the IP :) ifconfig ppp0 | grep "inet addr:" | awk '{ print $2}' | tail -c14 probably not the best solution, (the last part awk assumes your IP has 14 chars) but this came to mind first .. do some experimenting :) Hugo Vanwoerkom wrote: Hi, Ifconfig says:

ifconfig data

2009-02-19 Thread Hugo Vanwoerkom
Hi, Ifconfig says: ... ppp0 Link encap:Point-to-Point Protocol inet addr:200.57.201.43 P-t-P:200.57.219.18 Mask:255.255.255.255 ... I want that inet addr (200.57.201.43) in a program and I prefer not to run the ifconfig command from it and grep it. Does anyone know where el