Tzafrir Cohen <tzaf...@cohens.org.il> 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
manipulation.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org


Reply via email to