Hello, I am currently trying to use awk in order to calculate the average of values that are greater than 500 in column 1. What I have so far is:
awk ‘$1 > 500 {sum+=$1} END {print sum/NR}’
My issue is that I am not sure how to specify to divide the sum of values greater than 500 by the number of values greater than 500, since NR includes all the records.
This is for an intro level course.