I understand bash and some other interpreters only perform arithmetic for integers.  In the following for loop, how can I accomplish this?  I've read that bc can be used but am not sure how to use bc in this situation.total=0for number in `cat /path/to/file`; do        total=$(($total+$number))doneaverage=$(($total/10))echo Average is $averagefile:1.1433621.1939941.2104891.2105401.2276111.2434961.2608721.2767521.2941211.427371
Perform floating point arithmetic in shell script variable definitions
bash;shell script;bc
You may not want to use bc for this.  Perhaps awk would work better:awk '{sum+=$1};END{print sum/NR}' /path/to/file