[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Comando GREP
From: |
Ezequiel Gomes |
Subject: |
Re: [shell-script] Comando GREP |
Date: |
Tue, 18 Jun 2002 21:16:41 -0300 |
Oi Luiz Felipe,
Luiz Felipe Pereira wrote:
>
> Pessoal,
> Gostaria de saber de como posso usar o comando grep mas que ele retorne
> exatamente a string. Eu o estou usando porem se eu buscar uma substring de
> outra string, ele retorna as duas.
> Exemplo : fgrep test dreport.txt
> Nesta linha eu soh quero retorno da linha que apresenta test porem ele
> retorna linhas que tem como exemplo "teste"
>
> Alguem poderia me ajudar?
>
aí vai...
=========================
[ezequiel@eze ezequiel]$ cat >teste
testando
testado
test
testemunha
teste
teste
[ezequiel@eze ezequiel]$ cat teste
testando
testado
test
testemunha
teste
teste
[ezequiel@eze ezequiel]$ cat teste | grep -w teste
teste
teste
[ezequiel@eze ezequiel]$ cat teste | grep -w test
test
[ezequiel@eze ezequiel]$
===============================
obs.: "grep testa" também ignorou as duas primeira linhas do arquivo.
--
Data Estelar 2452438.490289
[]'s, Ezequiel - Curitiba - Paraná
Linux User #76205
(Registre-se em: http://counter.li.org)