AWK rounding up numbers

Hi,

I have managed to round up numbers by using the following command:

echo "5.54" | awk '{printf "%.0f\n", $1}'

result

6

How can I round up all the numbers in a column in a file and print the lines with the new calculated totals?

Thanks,

$> cat infile
0.22 0.33 0.44
2.22 3.33 4.44
$> awk '{a+=$1; b+=$2; c+=$3} END{printf("%0.f %0.f %0.f\n", a,b,c)}' infile
2 4 5

Thanks.

My file has 15 columns and quite a few lines. I would like to round up the numbers of column 14 only. The other columns don't contain numbers.

The file is like this:

,fred,a,b,c,e,f,g,h,i,j,k,l,m,4.7,z,
,henry,a,b,c,e,f,g,h,i,j,k,l,m,1.4,z,
,bob,a,b,c,e,f,g,h,i,j,k,l,m,3.2,z,

The output should be:

,fred,a,b,c,e,f,g,h,i,j,k,l,m,5,z,
,henry,a,b,c,e,f,g,h,i,j,k,l,m,2,z,
,bob,a,b,c,e,f,g,h,i,j,k,l,m,4,z,

Thanks,

Try this:

awk -F, '{$15=$15==int($15)?int($15):int($15)+1}1' OFS=","