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

Re: Wie default IP ermittlen?



> > Letzteres dagegen mit:
> > ip a l $( route -n | awk ' $1 == "0.0.0.0" { print $8 } ' ) | \
> > awk -F '[ |/]+' ' $2 == "inet" { print $3 } '

Den String bekomme ich nicht in shell_exec() weil irgend ein  ESC  error
drin ist.

> Hmmm. denke, das lezteres das richtige sein könnte...

War wohl nichts:

192.168.0.12
192.168.0.11
192.168.0.20
192.168.0.50

oder respectiv eth0, eth0:1, eth0:2 und eth0:3.

Oder kann ich davon ausgehen, das die  gesuchte  IP  immer  an  oberster
Stelle steht?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux
               Internet Service Provider, Cloud Computing
                <http://www.itsystems.tamay-dogan.net/>
                  <http://www.debian.tamay-dogan.net/>

itsystems@tdnet                     Jabber  linux4michelle@jabber.ccc.de
Owner Michelle Konzack

Gewerbe Strasse 3                   Tel office: +49-176-86004575
77694 Kehl                          Tel mobil:  +49-177-9351947
Germany                             Tel mobil:  +33-6-61925193  (France)

USt-ID:  DE 278 049 239

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


Reply to: