[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] selecionar substring
From: |
Sergio Nery Simoes |
Subject: |
Re: [shell-script] selecionar substring |
Date: |
Mon, 2 Oct 2006 18:29:13 -0300 |
A forma usando dois cuts é assim:
ping -c 1 www.google.com 2> /dev/null | head -n 1 | cut -d"(" -f2 | cut
-d")" -f1
Sergio.
Em 02/10/06, Herbert Alexander Faleiros <address@hidden> escreveu:
>
> On Monday 02 October 2006 17:57, Celso Viana wrote:
> > como é que pega somente o que está
> > dentro dos parenteses (endereço IP)?
>
> sed -r 's/.+\((.+)\).+/\1/g'
>
>
>
[As partes desta mensagem que não continham texto foram removidas]
- Re: [shell-script] selecionar substring, (continued)
- 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, 2006/10/03
Re: [shell-script] selecionar substring, Herbert Alexander Faleiros, 2006/10/02
- Re: [shell-script] selecionar substring,
Sergio Nery Simoes <=
Re: [shell-script] selecionar substring, Vanderlei, 2006/10/03