June 2017
Beginner
502 pages
11h 26m
English
Actually, this is very similar to the the former operator, only in this case, we do a subtraction and reassign the value. Let's rewrite our last script with the operator and see what happens:
zarrelli:~$ ./userreassign-subtract.sh Hello user, please give me a number: 200And now another one, please: 50The user_input variable value is: 200The adding variable value is: 50200 subtracted of 50 is: 150And the user_input variable has now the value of 150But the adding variable has still the value of 50
Read now
Unlock full access