Scripts for computing the average of a list of numbers in a data file April 26, 2023 by Tarik Here is one method: $ awk '{s+=$1}END{print "ave:",s/NR}' RS=" " file ave: 54.646