res=$((63 * $test_num))
res=$((63 * ${test_num}))
res=$((63 * test_num))
Apparently not inside an expression.Seeker said:$ is mandatory to refer to variable's value!
dice@vps-2417-1:~>sh
$ test_num=8
$ echo $test_num
8
$ test_num
test_num: not found
$ $((test_num))
8: not found
$ $((8 * test_num))
64: not found
$
sh-3.2# test_num=8
sh-3.2# echo $test_num
8
sh-3.2# $((test_num))
sh: 8: command not found
$ test_num=8
$ echo $test_num
8
$ $((test_num))
syntax error: `$' unexpected
$ $(( 8 * test_num ))
syntax error: `$' unexpected
$ $(( $test_num ))
syntax error: `$' unexpected
: $((very_long_name += 1))
tvar=5
#echo $(("$tvar" += 5))
#echo $(($tvar += 5))
# Both errors with: 'arithmetic expression: expecting EOF: "5 += 5"'
# 10
echo $((tvar += 5))