-
Notifications
You must be signed in to change notification settings - Fork 5
awk tips
Shuai YUAN edited this page Dec 21, 2018
·
4 revisions
awk '{ sum += $2; n++; } END { if (n > 0) print sum / n }'
- https://stackoverflow.com/questions/19149731/use-awk-to-find-average-of-a-column
- https://stackoverflow.com/questions/30352241/awk-average-of-n-data-in-each-column
awk '{$1=$2=""; print $0}' somefile