Hi Bertram. I've tried some stuff here and ended up with this:
ifconfig | egrep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1 It's not pretty, but certainly works. Regards, Saffi On 10/25/07, Bertram Scharpf <[EMAIL PROTECTED]> wrote: > > > Hi, > > > in some script I need all the local IP addresses of a host, > as there are 127.0.01, 192.168.8.1, ... > > I can do this using the command suite > > LANG= /sbin/ifconfig | awk '/\<inet\>/{split($2,a,":");print a[2]}' > > As this is quite long I would like to ask whether there is > some smarter way to do it. > > Thanks in advance, > > Bertram Scharpf -- *Ricardo Saffi Marques* Laboratório de Administração e Segurança de Sistemas (LAS/IC) Universidade Estadual de Campinas (UNICAMP) *Cell:* +55 (19) 8128-0435 *Skype:* ricardo_saffi_marques *Website:* *http://www.rsaffi.com*