Calculating Averages | *nix Shell
I ran this script on 10’s of thousands of numbers and it takes a *long* time. That’s because you spawn an expr not once but twice for every number you average. Here is the script with your expr statement changed to native bash arithmetic expansion. #!/bin
nixshell.wordpress.com |