Hi, bc is great for transforming numbers from one type to another.
Like, having a number(int) transposed from hex to octal, or binary or digital/metric.
But to sum two ints "let" maybe of more use.
Let is a bash plugin and adds or subtracts, or divides, or modulus, or multiplic... you get my meaning?
So checkout man let, it will bring up the bash man file, scroll down till you get to "let".
let arg [arg ...]
Each arg is an arithmetic expression to be evaluated (see ARITHMETIC EVALUATION above).
If the last arg evaluates to 0, let returns 1; 0 is returned otherwise.
Here is an example....using variables
#sum-calls inspired by wlayton27 Atomicmpc.com.au forums.
for num in `cat /home/glenn/build/ibm-unix/calls03.csv`; do
let "sum += $num"
echo "Result in kb's: "$sum;
# # # bash division
echo "Result in Mb's: " $mbs;
echo "Result in Gb's: " $gbs;
I've just found about this function, please forgive me if I'm off topic.