linux - When does a variable add $ in bash -
i'm learning bash , confused when variable add $. find code like:
i=1 while [ $i -le 10 ] echo "$n * $i = `expr $i \* $n`" i=`expr $i + 1` done
the $ substitutes variable. writing $i insert value of i, no matter write it.
if want assign variable, makes no sense.
Comments
Post a Comment