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

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -