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

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

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


From: Tiago Barcellos Peczenyj
Subject: Re: [shell-script] Colunas - como excluir?
Date: Tue, 11 Apr 2006 15:41:55 -0300

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


reply via email to

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