Hi:
I've been studying this website on Shell Scripting for about a week and still have a way to go but have a few questions to the examples given.
I'm in the section of 'variable types' approx. 1/2 way down the page-
http://mywiki.wooledge.org/BashGuide/Parameters
Just before the example given it states that expansion happens when a parameter is prefixed by a $ sign- Here's part of the example that I don't understand:
Code:
$ a=5; a+=2 echo $a; unset a
52
$ a=5; let a+=2 echo $a; unseta
7
Ok; i see in the first example where expansion happened because it was prefixed y a $ sign. But the second line was prefixed as well but the work 'let' was introduced.
Was it because of the word 'let' used in the expression that allowed the normal value of 5 plus 2?
The article said" Integer: declare -i variable: holds an integer Assigning values to this variable automatically triggers Arithmetic Evaluation"
When numbers are used with variables and (expansion) that include words that allow the expression to be multiplied or added; in the future what is the indication besides the word 'let' that gives the indication of which kind of arithmetic is implied?
If it were you would you just print out the whole Guide?
My hand started giving me pain from all the writing-