gno/usr.bin/awk/tests/info.awk
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

8 lines
229 B
Awk

BEGIN { FS = "\t"; pat = ARGV[1]; ARGV[1] = "-" }
$1 ~ pat {
printf("%s:\n", $1)
printf("\t%d million people\n", $3)
printf("\t%.3f million sq. mi.\n", $2/1000)
printf("\t%.1f people per sq. mi.\n", 1000*$3/$2)
}