summaryrefslogtreecommitdiffhomepage
path: root/bench/functions.sh
blob: a220f4c4793e008206a5d6dccf41e2bbc6992196 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# Function calls with arguments and a for loop over words.
add() { r=$(($1 + $2)); }
i=0; r=0
while [ $i -lt 60000 ]; do
    add $r $i; i=$((i + 1))
done
for w in a b c d e f g h; do for v in 1 2 3 4 5 6 7 8; do r=$((r + 1)); done; done
echo $r