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


Responder a