[prog] Re : awk error

Diana Ionescu dianabesliu at yahoo.com
Fri Mar 21 15:40:53 UTC 2008


Maybe the answer will help somebody else too:

Thanks to Gentoo forum, I just found out that the cause of my error it's the locale.
I set romanian language at login and I forgot that we use, instead of .


Cheers,
Diana



----- Message d'origine ----
De : Diana Ionescu <dianabesliu at yahoo.com>
À : programming at linuxchix.org
Envoyé le : Vendredi, 21 Mars 2008, 1h43mn 39s
Objet : [prog] awk error

Hello,

I finally discovered the error in my codes (shell sccripts & c/c++) ...

I have a fresh new gentoo64 installed with 2.6.24-gentoo-r3, gcc-4.1.2, GNU Awk 3.1.5

So here is the *thing*
echo 60 6.510417e-05 | awk '{print ($1*$2)}'
360

when it should be: 0.00390625 (which I get on a different computer)


How can I enable the exponential readings? Or where is it coming from?

I should specify that I not sure if I can change the outputs of the codes into "normal" writing numbers.

Any help is very much appreciate.

Please excuse me if this is not exactly a programming problem.

Many thanks,
Diana



      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. La boite email la plus appreciée au monde. http://mail.yahoo.fr
_______________________________________________
Programming mailing list
Programming at linuxchix.org
http://mailman.linuxchix.org/mailman/listinfo/programming





      _____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Capacité de stockage illimitée pour vos emails. http://mail.yahoo.fr


More information about the Programming mailing list