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: Bruno Coimbra
Subject: Re: [shell-script] Re: Regexp - IP
Date: Tue, 2 Sep 2008 09:14:51 -0300
User-agent: KMail/1.9.9

On Monday 01 September 2008 18:42:56 Alain M. wrote:
> 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?


Porque não utilizar outro "| cut -d' ' -f1"?

-- 
Bruno Coimbra
address@hidden

Slackware: Simplicity is Divine!


reply via email to

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