[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] selecionar substring
From: |
Eric Anderson |
Subject: |
Re: [shell-script] selecionar substring |
Date: |
Tue, 3 Oct 2006 18:08:35 -0300 |
c quer o ip à partir de um nome neh?
eu uso:
server_pop_terra=`host pop.sao.terra.com.br | cut -d " " -f4`
sds
Do nada elegante,
Eric
----- Original Message -----
From: Humberto Pereira
To: address@hidden
Sent: Monday, October 02, 2006 6:08 PM
Subject: Re: [shell-script] selecionar substring
On Mon, 02 Oct 2006 17:57:49 -0300, Celso Viana <address@hidden>
wrote:
> Na linha abaixo, como é que pega somente o que está dentro dos
> parenteses (endereço IP)?
>
> PING teste.com (69.36.226.134): 56 data bytes
Opa,
[begnini@coke analise]$ echo "PING teste.com (69.36.226.134): 56 data
bytes" | sed -r 's/^.*\((([0-9]{1,3}\.){3}[0-9]{1,3}).*$/\1/'
69.36.226.134
[begnini@coke analise]$
[]s
Humberto Pereira
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
[As partes desta mensagem que não continham texto foram removidas]
- Re: [shell-script] selecionar substring, (continued)
- Re: [shell-script] selecionar substring, Tiago Barcellos Peczenyj, 2006/10/02
- Re: [shell-script] selecionar substring, Humberto Pereira, 2006/10/02
- Re: [shell-script] selecionar substring, Celso Viana, 2006/10/02
- Re: [shell-script] selecionar substring, Humberto Pereira, 2006/10/02
- Re: [shell-script] selecionar substring, Alfredo Casanova, 2006/10/02
- Re: [shell-script] selecionar substring, Sergio Nery Simoes, 2006/10/02
- Re: [shell-script] selecionar substring, Julio C. Neves, 2006/10/03
- Re: [shell-script] selecionar substring, Sergio Nery Simoes, 2006/10/04
- Re: [shell-script] selecionar substring, Julio C. Neves, 2006/10/05
- Re: [shell-script] selecionar substring, Sergio Nery Simoes, 2006/10/06
Re: [shell-script] selecionar substring,
Eric Anderson <=
Re: [shell-script] selecionar substring, Herbert Alexander Faleiros, 2006/10/02
Re: [shell-script] selecionar substring, Vanderlei, 2006/10/03