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

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

Re: [shell-script] Regexp - IP


From: Douglas Milanez
Subject: Re: [shell-script] Regexp - IP
Date: Fri, 29 Aug 2008 11:42:54 -0300

Fala Cléoson, beleza?

> Vê se ajuda:
> # ifconfig eth0 | awk '/inet end.:/ { print $3 }'
> 192.168.0.128
>
> #ifconfig eth0 | grep inet | tr -s " " | cut -f4 -d" "
> 182.168.0.128

Os comandos ajudaram sim, mas gostaria de algo mais transparente pra
terminal e distros, ex: No meu Slack o ifconfig retorna "inet addr",
já no Ubuntu fica: "inet end"...

Desculpa, mas sou novato em shell e regexp.

-- 
[]'s,
Douglas Milanez.


reply via email to

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