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

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

Re: [shell-script] grep ignorando linha


From: Alysson Gonçalves de Azevedo
Subject: Re: [shell-script] grep ignorando linha
Date: Wed, 18 Jun 2014 20:49:32 -0300

Não resolve não D:
$ cat arquivo
#nome email
joão address@hidden
maria address@hidden
fulano address@hidden
#maria maria@qualquer.coisa

$ grep maria arquivo | grep -v ^#
maria address@hidden

$ grep -v '^#.*maria' arquivo
#nome email
joão address@hidden
maria address@hidden
fulano address@hidden

 



Alysson Gonçalves de Azevedo

"Anarcho-syndicalism is a way of preserving freedom." - Monty Python


Em 18 de junho de 2014 20:36, 'Julio C. Neves' address@hidden [shell-script] <address@hidden> escreveu:
 

Se entendi,
$ grep -v '^#.*work' arquivo
Resolve.

Em 18/06/2014 19:57, "Alysson Gonçalves de Azevedo address@hidden [shell-script]" <address@hidden> escreveu:

 

Olá, pessoal.

Eu tenho grep que filtra uma palavra no arquivo e depois remove as linhas que são comentários.

$ grep work file | grep -v ^#

Tem como juntar isso em um grep só?

Alysson Gonçalves de Azevedo

"Anarcho-syndicalism is a way of preserving freedom." - Monty Python



reply via email to

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