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

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

Re: RES: [shell-script] deletar ( parte 2)


From: Aurelio Marinho Jargas
Subject: Re: RES: [shell-script] deletar ( parte 2)
Date: Thu, 18 Nov 2004 11:50:11 -0300 (ART)

alou,

 --- lferreir1 <address@hidden> escreveu: 
> Galera, consegui resolver o meu problema, com o seguinte comando:
> # --------------------------------------------------
> awk '{ FS="     "; print $7, $1, $2, $3, $4, $5, $6, $8;OFS="   " }' 
> eliane_d_ate_j | egrep '^013|^014' > arquivo_com_013_ate_014
> 
> awk '{ FS="     "; print $2, $3, $4, $5, $6, $7, $1, $8;OFS="   " }' 
> arquivo_com_013_ate_014 > arquivo_com_013_ate_014_quente
> # -------------------------------------------------

boa!

mas jah que você usou o egrep, pode usar somente ele para
a tarefa, basta escrever uma ER monstra :)

   egrep '^([^TAB]*TAB){6}01[34]' arquivo > resultado

onde TAB é um TAB literal (Ctrl+V, TAB).

essa expressão procura por seis campos quaisquer seguidos
de TAB  ^([^TAB]*TAB){6}    seguida de 013 ou 014.

falou!

obs.: engraçado, nunca, nem uma vez sequer na vida
      precisei do awk.

=====
-- 
Aurelio Marinho Jargas, Curitiba, Conectiva
Funcoes ZZ v4.1111 http://aurelio.net/zz
txt2tags v2.1 http://txt2tags.sf.net/pt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


reply via email to

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