Re: how to substitute ',' by '.' within awk script

From: Mohammed Kamal (Mohamed.Kamal@SPDC.COM.EG)
Date: Thu Jan 23 2003 - 14:40:53 EST


The trick is to run a system command inside the awk script
to do so enclose the command into double quotation " "
so inside the awk script write e.g. "sed -e s/,/./"
Number_To_Be_Manipulated

Best Regards
Mohammed Kamal
Systems Engineer

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU]On Behalf Of
Jarzombek, Svend
Sent: Thu, January 23, 2003 5:09 PM
To: aix-l@Princeton.EDU
Subject: how to substitute ',' by '.' within awk script

Content of $4 is 0.500
$4 *= 0.5 results in 0,25 and leads to an additional value in VALUES clause
of INSERT statement (SQL).
0.25 is needed as result to INSERT into database correctly.

I start walking through the archives, but maybe someone can point to the
right direction meanwhile.

Thanks in advance

Svend



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:31 EDT