wmi-parprog/04_AWK/5.awk
2024-03-21 12:10:49 +01:00

19 lines
205 B
Awk

BEGIN {
sum = 0.0;
}
{
if ($1 != "#") {
sum += $2;
if ($2 > 40.0) {
print "Country ", $1, "has", $2, "mln people";
}
}
print "Nr of columns", NF;
}
END {
print "Total population ", sum;
}