gno/usr.bin/awk/tests/form1

11 lines
299 B
Plaintext
Raw Normal View History

# form1 - format countries data by continent, pop. den.
BEGIN { FS = ":"
printf("%-15s %-10s %10s %7s %12s\n",
"CONTINENT", "COUNTRY", "POPULATION",
"AREA", "POP. DEN.")
}
{ printf("%-15s %-10s %7d %10d %10.1f\n",
$1, $2, $3, $4, $5)
}