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

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

RES: [shell-script] Colunas - como excluir?


From: Julio Cezar Neves - DATAPREVRJ
Subject: RES: [shell-script] Colunas - como excluir?
Date: Tue, 11 Apr 2006 16:34:12 -0300

Tiago, essa não vale, :)
o Gentil já havia postado. Além de rodar só no Linux, ainda precisa que este
seja das últimas (últimas mesmo!) releases. Por isso resolvi arriscar aquele
one-liner mixuruca.

[ ]s,
Julio Cezar Neves
Tel:+55 21 2555-6148 / +55 21 8112-9988
Fax: +55 21 2555-6154
http://www.julioneves.com


| -----Mensagem original-----
| De: Tiago Barcellos Peczenyj [mailto:address@hidden]
| Enviada em: terça-feira, 11 de abril de 2006 15:42
| Para: address@hidden
| Assunto: Re: [shell-script] Colunas - como excluir?
| 
| 
| On 4/11/06, Julio Cezar Neves - DATAPREVRJ
| <address@hidden> wrote:
| >  Não resisto a um one-liner, mesmo que fique uma porcaria :)
| 
| Nem eu...
| 
| $ cat arq.dat
| est49   est50   est51   est53   est54
| 1.409   1.231   1.281   1.102   1.078
| 1.409   1.231   1.281   1.102   1.078
| 
| peczenyj@brpoatiago ~
| $ tr -s ' ' < arq.dat | cut --complement -d' ' -f 1,3,5
| est50 est53
| 1.231 1.102
| 1.231 1.102
| 
| Eu imaginava que o cut tinha alguma opção para 'não pegar' alguma
| coisa, no info encontrei a opção '--complement' :
| 
| "This option is a GNU extension.  Select for printing the complement
| of the bytes, characters or fields selected with the `-b', `-c' or
| `-f' options.  In other words, do _not_ print the bytes, characters or
| fields specified via those options.  This option is useful when you
| have many fields and want to print all but a few of them."
| --
| Tiago B Peczenyj
| Linux User #405772
| 
| # cd /pub
| # more beer
| 
| 
| ---------------------------------------------------------------------
| Esta lista não admite a abordagem de outras liguagens de 
| programação, como perl, C etc. Quem insistir em não seguir 
| esta regra será moderado sem prévio aviso.
| ---------------------------------------------------------------------
| Sair da lista: address@hidden
| ---------------------------------------------------------------------
| Esta lista é moderada de acordo com o previsto em 
http://www.listas-discussao.cjb.net
---------------------------------------------------------------------
Servidor Newsgroup da lista: news.gmane.org
Grupo: gmane.org.user-groups.programming.shell.brazil

 
Links do Yahoo! Grupos




 




reply via email to

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