I'm trying to sum floats which use the comma as separator, and gawk does integer calculations. Here's the script:
BEGIN {
FS=";"
OFS=";"
CONVFMT = "%2.2f"
}
{
print $1
print $2
print $1+$2
}
I'm using this data file:
4,3;5,7
and calling the script like this:
LC_ALL=fr_BE gawk -f test.awk < t.txt
I get this output:
4,3
5,7
9
I have the fr_BE locale set up, but the result is still incorrect. How can I fix this?