how to sum numbers in column

Hi,
i want to sum all nubers in one column. Example:
12.23
11
23.01
3544.01
I'm trying to do this in awk, but it doesn't work properly.
Seems like awk is summing only integers, for example:
12
11
23
3544
It cuts off numbers after dot.
I used this command:
akw /text/ file.txt |nawk 'BEGIN {FS="|"}; {sum += $10} END { printf ("%8.2f\n",sum)}'
but it doesn't work.

ok. i've done it:
akw /text/ file.txt |nawk 'BEGIN {FS="|"}; {print $10"+"}' > file1.log
echo "p" >>file1.log
cat file1.log|dc > file2.log
grep -v "stack empty" file2.log
not the most elegant way but it works :slight_smile: