Skip to content

Instantly share code, notes, and snippets.

@mtszpater
Created June 10, 2017 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtszpater/e5d90c6313a777d5632db6bf7cf3a770 to your computer and use it in GitHub Desktop.
Save mtszpater/e5d90c6313a777d5632db6bf7cf3a770 to your computer and use it in GitHub Desktop.
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