shell-script-pt
[Top][All Lists]
Advanced

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

Re: [shell-script] Re: Regexp - IP


From: Alain M.
Subject: Re: [shell-script] Re: Regexp - IP
Date: Mon, 01 Sep 2008 18:42:56 -0300
User-agent: Thunderbird 2.0.0.6 (X11/20070728)


jimmy escreveu:
Como que eu faço "grep -w inet" usando "grep -E" ???

se colocar algo como " inet " (delimitado por espaços) não resolve?

Resolve, obrigado :)

então tenho um novo problema:

na minha máquina:
# ifconfig eth0 | grep "inet "
          inet end.: 10.0.0.33  Bcast:10.0.0.255  Masc:255.255.255.0
# ifconfig eth0 | grep "inet " | cut -d ':' -f2
 10.0.0.33  Bcast

No embedded com busybox
# ifconfig eth0 | grep "inet "
          inet end.:10.0.0.33  Bcast:10.255.255.255  Masc:255.0.0.0
# ifconfig eth0 | grep "inet " | cut -d ':' -f2
10.0.0.33  Bcast

observem que em um caso existe um " " antes do ip e no outro não...

Alguma sugestão que funciona nos dois?

Alain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]