June 2017
Beginner
502 pages
11h 26m
English
In this case, we are multiplying the value of the variable for the given number and reassigning:
zarrelli:~$ ./userreassign-multiply.sh Hello user, please give me a number: -1And now another one, please: 9223372036854775808The user_input variable value is: -1The adding variable value is: 9223372036854775808-1 multiplied for 9223372036854775808 is: -9223372036854775808And the user_input variable has now the value of -9223372036854775808But the adding variable has still the value of 9223372036854775808
Nice! Indeed, we reached one of boundaries of the modern Bash: in the past, the value held by a variable could be represented by a 32-bit signed long, but from version 2.05b onward it switched to a 64-bit signed integer in the ...
Read now
Unlock full access