wmi-parprog/04_AWK/3.awk
2024-03-18 18:15:48 +01:00

17 lines
170 B
Awk

BEGIN {
sum = 0.0;
}
{
pop = $2;
if ($2 > 40 && $2 < 4000) {
print $2, pop, NF;
print $2, pop, NF;
}
sum += pop;
}
END {
print "Sum of all people is ", sum
}