Awk:
awk '{ total += $2 } END { print total/NR }' yourFile.whatever
Read as:
- For each line, add column 2 to a variable ‘total’.
- At the end of the file, print ‘total’ divided by the number of records.
Awk:
awk '{ total += $2 } END { print total/NR }' yourFile.whatever
Read as: