[GRASS5] Re: [GRASS-CVS] hamish: grass6/scripts/r.fillnulls r.fillnulls,1.10,1.11

On Wed, Mar 02, 2005 at 03:22:52AM +0100, grass@intevation.de wrote:

Author: hamish

Update of /grassrepository/grass6/scripts/r.fillnulls
In directory doto:/tmp/cvs-serv25769

Modified Files:
  r.fillnulls
Log Message:
remove AWK for doing decimal multiplication -- broke when decimal point was a ",".
The buffer distance is pretty arbitrary anyway, so not a big deal if we lose
sub-meter precision (I hope).

What about using

LC_ALL=C echo 0.3 0.3 | awk '{printf "%.8f", ($1 + $2)}'

?

Markus

> remove AWK for doing decimal multiplication -- broke when decimal
> point was a ",". The buffer distance is pretty arbitrary anyway, so
> not a big deal if we lose sub-meter precision (I hope).
>

What about using

LC_ALL=C echo 0.3 0.3 | awk '{printf "%.8f", ($1 + $2)}'

Could work, but I've never really used any of the language encoding
magic so someone else will have to test..

Hamish

Markus Neteler wrote:

> remove AWK for doing decimal multiplication -- broke when decimal point was a ",".
> The buffer distance is pretty arbitrary anyway, so not a big deal if we lose
> sub-meter precision (I hope).
>

What about using

LC_ALL=C echo 0.3 0.3 | awk '{printf "%.8f", ($1 + $2)}'

?

  echo 0.3 0.3 | LC_ALL=C awk '{printf "%.8f", ($1 + $2)}'

Temporary environment bindings apply to the individual commands rather
than to the pipeline as a whole.

--
Glynn Clements <glynn@gclements.plus.com>