echo '123456789.12'|awk '{printf "%'"'"'18.2f\n",$0}'`echo 123456789.12 | sed '{:a;s/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta}'`