In Linux, you have shell script, that has already defined x=2 and y=3, how do you print out the sum of x and y?
Answer
echo $[x+y]
Question
In Linux, you have shell script, that has already defined x=2 and y=3, how do you print out the sum of x and y?
Answer
?
Question
In Linux, you have shell script, that has already defined x=2 and y=3, how do you print out the sum of x and y?
Answer
echo $[x+y]
If you want to change selection, open document below and click on "Move attachment"
7. Shell Scripting variable because its contents can vary. You can use shell scripts like a calculator. Try 5 echo "I will work out X*Y" echo "Enter X" read X echo "Enter Y" read Y echo "X*Y = $X*$Y = $[X*Y]" The <span>[ and ] mean that everything between must be evaluated [Substituted, worked out, or reduced to some simplified form. ] as a numerical expression [Sequence of numbers with + , - , * , etc. betwe
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.