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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

decimal point

Status
Not open for further replies.

tonivm

Technical User
Mar 2, 2006
64
ES
hi:
anybody tell me how could i do for that in output fields the decimals appear dot separator and not comma?
i try with:

{
str_tst=tst; gsub(/\./, ",", str_tst);
str_cSZA=cSZA; gsub(/\./, ",", str_cSZA);
str_SZA=SZA; gsub(/\./, ",", str_SZA);
str_Ilw=Ilw; gsub(/\./, ",", str_Ilw);
str_test=test; gsub(/\./, ",", str_test);
str_df_test=df_test; gsub(/\./, ",", str_fd_test);
};

and after this it doesn't function correctly.
thanks in advance
 
I am not sure that I have I fully understood your question, but does this achieve what you are trying to do:

str_tst=`echo ${tst} | tr ',' '.'`
str_cSZA=`echo ${cSZA} | tr ',' '.'`
. . .

(NB don't confuse a backtick ` with a single quote ' )

I hope that helps, even though it doesn't use awk

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top