|
totalling in awk script
> using awk (on SCO Unix) i tried to take a summary of a datafile
> the code used is:
> awk '
> FILENAME == "FLN" {balance[substr($0,14,3)] += substr($0,17,13) {
> END {for ( name in balance ) printf("%013s %3s of %8s\n",
> balance[name]/100,name,dt) | "sort" } ' fln
>
>
> THE result i get is not proper. Where the amounts are large,
> it displays total in some odd fashion.
>
> Can u please see where I am making mistake.
where the amounts are not large it is giving correct result
only where amounts are large it errs
>
> Doshi
>
|