17 lines
170 B
Awk
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
|
|
} |