[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] numero decimais awk
From: |
Felipe Kellermann |
Subject: |
Re: [shell-script] numero decimais awk |
Date: |
Tue, 27 Jun 2006 01:31:34 -0300 (BRT) |
User-agent: |
Pine <http://www.washington.edu/pine/> |
On Mon, 26 Jun 2006 11:09pm -0300, Tiago Barcellos Peczenyj wrote:
> Ola
>
> Vendo as respostas para os scripts awk no seu ambiente, teste isso:
>
> tr '.' ',' < temp2.dat | awk 'NR != 1{soma2 += $2 ; print soma2,$2 }'
>
> Acho que tem haver com localização. afinal por que vc imprime
> variaveis do tipo ponto flutuante com virgula ao inves de ponto?
Sim.
Depende do locale.
Ou:
% LANG=POSIX awk 'NR != 1 { soma2 += $2 ; print soma2,$2 }' temp.dat
--
Felipe Kellermann