gno/usr.bin/awk/tests/check3a
tribby ddb82cb2e0 Remaining files for awk 2.0 that were left out of the previous checkin.
Maybe someday I'll become adept at using cvs...
1998-04-07 17:06:53 +00:00

17 lines
383 B
Plaintext

# check3 - print check information
# check3a modified to print in format that prchecks can use
BEGIN { RS = ""; FS = "\n" }
/(^|\n)check/ {
for (i = 1; i <= NF; i++) {
split($i, f, "\t")
val[f[1]] = f[2]
}
printf("%5d\t%s\t%s\n",
val["check"],
sprintf("%.2f", val["amount"]),
val["to"])
for (i in val)
delete val[i]
}