[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: what is my IP?



On Saturday 29 January 2005 10:35, gerhard wrote:
>Am Samstag 29 Januar 2005 15:31 schrieb Gerhard Gaußling:
>> $  su --command="ifconfig |egrep -A1  Point-to-Point|egrep '(inet
>> addr:)'| sed -n '1p'"|gawk '{print  $2}'|cut -c6-22
>
>better You use this script, it doesn't need root access:
>#/usr/local/bin/myip
>#!/bin/bash
>echo "Current IP is:"
>/sbin/ifconfig |egrep -A1  Point-to-Point|egrep '(inet addr:)'|  \
>sed -n '1p'|gawk '{print  $2}'|cut -c6-22
>
Which returns an empty Current IP is:
as there is not a Point-to-Point output from an ifconfig, that info is 
all in my routers web page screen.

>Kind regards
>
>Gerhard Gaußling

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.32% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2005 by Maurice Eugene Heskett, all rights reserved.



Reply to: