wmi-parprog/04_AWK/3.awk

17 lines
170 B
Awk
Raw Normal View History

2024-03-18 18:15:48 +01:00
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
}