May 28, 2003 #1 UCF87 Technical User Feb 13, 2003 44 US Is the a way to "turn off" rounding? When the amounts get up to 6 figures AIX rounds up when cents are > 50. for FILE in `ls *.Amt` do awk '{e=substr($1,length($1)) $1;sum+=e}END{print sum}' $FILE >> TOTAL done Thanks in advance.
Is the a way to "turn off" rounding? When the amounts get up to 6 figures AIX rounds up when cents are > 50. for FILE in `ls *.Amt` do awk '{e=substr($1,length($1)) $1;sum+=e}END{print sum}' $FILE >> TOTAL done Thanks in advance.
May 28, 2003 1 #2 CaKiwi Programmer Apr 8, 2001 1,294 US Try replacing the print with printf("%8.2f",sum) CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt Upvote 0 Downvote
Try replacing the print with printf("%8.2f",sum) CaKiwi "I love mankind, it's people I can't stand" - Linus Van Pelt
May 28, 2003 Thread starter #3 UCF87 Technical User Feb 13, 2003 44 US Thank you that work.. Upvote 0 Downvote