Re: ifconfig data

Tzafrir Cohen <tzafrir@xxxxxxxxxxxxx> 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 addr:/{ split($2, a, ":"); print a[2] }'

Once you invoke awk, you may as well use it for all your string

To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx