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

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

Re: Dúvida Shell x Awk : Substring


From: hiksilva
Subject: Re: Dúvida Shell x Awk : Substring
Date: Wed, 02 Mar 2005 14:28:51 -0000
User-agent: eGroups-EW/0.82

Valeu! Funcionou. Tenho q aprender mais sobre sed e expressões 
regulares.

Obrigado,

Henrique Silva

--- Em address@hidden, Adam Victor Nazareth 
Brandizzi <qbyron@y...> escreveu
> Em Qua, 2005-03-02 às 13:58 +0000, hiksilva escreveu:
> > 
> > Olá! Amigos,
> > 
> > Não estou conseguindo retornar uma substring utilizando o awk. 
Não 
> > sei se a sintaxe que estou utilizando está correta. Alguém 
poderia me 
> > ajudar? Não sei se está é a melhor solução. Não estou conseguindo 
> > retornar uma substring utilizando as funções index e substr do 
awk.
> > Utilizo Korn Shell
> > [...]
> > $ Teste teste teste teste Teste teste teste teste Teste teste 
teste 
> > teste
> > Teste teste teste teste Teste teste teste teste Teste teste teste 
> > teste
> > 
> > Não consigo obter este resultado
> 
> Que tal isto?
> 
> $ TEXTO='Foo, bar, baz. Bla, bla, bla. Senhora, partem tão 
tristes...'
> $ DIVISOR='bla.'
> $ echo $TEXTO | sed "s/.*$DIVISOR\(.*\)/\1/g"
> Senhora, partem tão tristes...
> 
> > Grato,
> > 
> > Henrique Silva
> 
> -- 
> Adam Victor Nazareth Brandizzi
> Estudante de Ciência da Computação - UnB
> Jabber: bardo0@m...




reply via email to

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