Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing decimal number!why does AWK do it using comma?!?! 1

Status
Not open for further replies.

massivr

Technical User
Jun 6, 2007
4
IT
Hi everybody!
Hope someone could help me cause awk is driving me crazy!
this is the problem:when i print on screen output a decimal(float) number awk gives me back a number in which the decimal are separated by a COMMA from the nember's integer parts!!!Obiouvsly i can't use awk output with gnuplot which plot only decimal number like 0.003 an not 0,003!
Is there any setting or option that i can change to let awk print out decimal number written using dot an not comma(i.e 0.003 instead 0.003)?!
thanks in advance!
 
Set the LANG or LC_ALL variables before launching awk, eg:
LANG=C awk ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Cheers PH!

NOW all'it's ok!
By the way.....is it possible to add the command LANG=C somewhere in LINUx to resolve permanently this "problem"?!?
thanks!
 
Simply export it in your .profile

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top