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

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

Re: [shell-script] D�vida_com_o_sed.


From: Frederico Argolo
Subject: Re: [shell-script] Dúvida_com_o_sed.
Date: Thu, 15 May 2003 15:15:30 -0300 (ART)

Ops, o email foi enviado sem eu ter terminado...

resumindo, Deivid, o 's' substitui.

$cat arquivo
Hello World

$sed 's/Hello/Ola/' arquivo
Ola World

[]'s
      Fred

 --- Frederico Argolo <address@hidden>
escreveu: > 
> Nao sei se entendi a pergunta, mas....
> 
> $man sed
> s/regexp/replacement/ ->
> Attempt  to match regexp against the pattern space.
>               If successful, replace that  portion 
> matched  with
>               replacement.   The replacement may
> contain the spe-
>               cial character & to refer to that 
> portion  of  the
>               pattern   space  which  matched,  and 
> the  special
>               escapes \1 through \9 to refer to the
> corresponding
>               matching sub-expressions in the
> regexp.
> 
> 
>  --- Deivid Vilela <address@hidden> escreveu:
> >
> Eu tenho visto uma porcentagem marcante de problemas
> > sendo resolvidos aqui
> > na lista usando-se o sed mas sinceramente ainda
> nao
> > consegui entender esta
> > opção "s" que vocês usam.
> > 
> > sed
> >
>
's/ALARM:\(35-180\(91\|10\)\|1-180\(10\|11\|91\|92\)\)//g'
> > 
> > nesta combinação de barras e pipes eu ainda nao
> > consegui entender muito
> > menos construir algo em utilização prática.
> > 
> > Será que alguem da lista poderia  dar uma luz de
> > como funciona a opção "s"
> > do sed?
> > 
> > Obrigado
> > 
> > Deivid Vilela

_______________________________________________________________________
Yahoo! Mail
O melhor e-mail gratuito da internet: 6MB de espaço, antivírus, acesso POP3, 
filtro contra spam. 
http://br.mail.yahoo.com/


reply via email to

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