Created
June 10, 2017 20:27
-
-
Save mtszpater/e5d90c6313a777d5632db6bf7cf3a770 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum=0 | |
count=0 | |
while [ -n "$1" ]; do | |
((count++)) | |
sum=`expr $sum + $1` | |
shift | |
done | |
expr $sum / $count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment