The file data.txt contains the following:
data.txt
1.00 1.23 54.4 213.2 3.4
The output of the scripts are supposed to be:
ave: 54.646
Some simple scripts are preferred.
Here is one method:
$ awk '{s+=$1}END{print "ave:",s/NR}' RS=" " file ave: 54.646
1.4m articles
1.4m replys
5 comments
57.0k users