|
From: | Alfredo Casanova |
Subject: | Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes |
Date: | Tue, 19 Mar 2019 13:14:19 -0300 |
Sim, certamente o time só vai pegar o awk, tanto é q o resultado sai após a medição no output. Fiz sem prestar atenção.Aqui deu alguns décimos a mais
time awk 'length>17' a>b;fgrep -cxf <(nl b) <(rev b|nl)
real 0m3,630s
user 0m3,584s
sys 0m0,045s
243
Mas esse 'time' não pega só a execução do awk?
Devido à separação do resto da linha ';'
Rodando a linha toda num subshell o time retornou um tempo maior.
time (awk 'length>17' a>b;fgrep -cxf <(nl b) <(rev b|nl))
243
real 0m4,024s
user 0m3,862s
sys 0m0,314s
Abraços Paulo
On 18/03/2019 13:22, Alfredo Casanova address@hidden [shell-script] wrote:
> time awk 'length>17' a>b;fgrep -cxf <(nl b) <(rev b|nl)
>
> real0m3.193s
> user0m3.142s
> sys0m0.048s
> 243
>
>
> On Mon, Mar 18, 2019 at 1:20 PM Alfredo Casanova <address@hidden <mailto:address@hidden>> wrote:
>
> Aí, resolvi! pra eliminar os repetidos:
>
> *awk 'length>17' a>b;fgrep -cxf <(nl b) <(rev b|nl)*
> 243
>
> hahahaha
>
> On Mon, Mar 18, 2019 at 12:30 PM address@hidden <mailto:address@hidden> [shell-script]
> <address@hidden <mailto:address@hidden>> wrote:
>
> __
>
> Caríssimo,
>
>
> Eu não consegui acessar o arquivo que usou, mas no teste que fiz com um arquivo de exemplo não
> contabilizou as linhas repetidas.
>
> Se liberarem o acesso ao arquivo, mais tarde eu faço um teste e tento entender o problema dessa
> discrepância na contagem.
>
> Normalmente o grep conta as linhas casadas apenas usando a opção -c, mesmo havendo repetição no
> arquivo com o padrão de pesquisa.
>
> Depois dou um retorno
>
>
>
> --
> []'s
> Alfredo Tristão Casanova .͘.
> Linux User #228230
> tel: +55 61 9655 9619
>
>
>
> --
> []'s
> Alfredo Tristão Casanova .͘.
> Linux User #228230
> tel: +55 61 9655 9619
>
>
> ----------------------------------------------------------
> Enviado por: Alfredo Casanova <address@hidden>
> ----------------------------------------------------------
--[]'s
Alfredo Tristão Casanova .͘.
Linux User #228230
tel: +55 61 9655 9619--[]'s
Alfredo Tristão Casanova .͘.
Linux User #228230
tel: +55 61 9655 9619
[Prev in Thread] Current Thread [Next in Thread]
- Re: [shell-script] Re: Detectar palíndromes, (continued)
- Re: [shell-script] Re: Detectar palíndromes, itamarnet, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Julio C. Neves, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, itamarnet, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, Paulo, 2019/03/19
- Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/19
- Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova <=
- Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes, Julio C. Neves, 2019/03/20
- Re: [shell-script] Re: Detectar palíndromes, Julio C. Neves, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, itamarnet, 2019/03/18
- Message not available
- Re: [shell-script] Re: Detectar palíndromes, Robson Alexandre, 2019/03/18
- Re: [shell-script] Re: Detectar palíndromes, itamarnet, 2019/03/19
- Re: [shell-script] Re: Detectar palíndromes, Alfredo Casanova, 2019/03/18
- Prev by Date: Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes
- Next by Date: Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes
- Previous by thread: Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes
- Next by thread: Re: [shell-script] Re: [shell-script] Re: Detectar palíndromes
- Index(es):