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

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

Re: [shell-script] notação científica - como lidar?


From: Felipe Kellermann
Subject: Re: [shell-script] notação científica - como lidar?
Date: Thu, 1 Jun 2006 20:23:48 -0300 (BRT)
User-agent: Pine <http://www.washington.edu/pine/>

On Thu, 1 Jun 2006 12:15pm  -0300, Ricardo Acosta wrote:

> mesmo usando o "printf %E" (utilizado para notação científica).
> não obtive êxito. Visto que o "seq" não aceita este tipo de notação.
> alguém teria alguma sugestão?

Ele aceita, sim. Ou tu pode usar zsh, tambem, e ter floats sem fazer 
coisas feias com seq/awk/bc/etc:

  % for ((f = 1.0e+0; f <= 5.0e+0; f += 0.5e+0)); { print $f }
  1.0000000000
  1.5000000000
  2.0000000000
  2.5000000000
  3.0000000000
  3.5000000000
  4.0000000000
  4.5000000000
  5.0000000000

-- 
Felipe Kellermann


reply via email to

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