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

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

RE: [shell-script] Busca linha em arquivo


From: Aurelio Marinho Jargas
Subject: RE: [shell-script] Busca linha em arquivo
Date: Mon, 15 Dec 2003 10:07:59 -0300 (ART)

oi andré,

 --- André_Luiz_Alves_da_Silva_Prates <address@hidden>
> Estou com Unix Tru64 e o grep não tem este parametro. Seria
> possível simular isso com sed?

sim!

$ cat lixo | sed -n '/Sending buffer/{n;p;}'
F21  8112247  2            07009865745                    009

aí nem precisa dos dois greps

$ cat lixo | sed -n '/Sending buffer/{n;p;}' |  tr -s " " |
  cut -d" " -f1-3
F21 8112247 2


falou!


> From: Aurelio Marinho Jargas [mailto:address@hidden]
> 
> $ cat lixo | grep -A1 "Sending buffer"
> Sending buffer
> F21  8112247  2            07009865745                    009
> 
> $ cat lixo | grep -A1 "Sending buffer" | grep -v Sending |
>   tr -s " " | cut -d" " -f1-3
> F21 8112247 2
> 
> > --- André_Luiz_Alves_da_Silva_Prates <address@hidden>
> > > Estou precisando buscar somente as três colunas que estão
> > >  abaixo de "Sending buffer"


=====
-- 
Aurelio Marinho Jargas - De volta para Curitiba & Conectiva
RAC! RAC! RAC! http://aurelio.net/rac

______________________________________________________________________

Yahoo! Mail: 6MB, anti-spam e antivírus gratuito! Crie sua conta agora:
http://mail.yahoo.com.br


reply via email to

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