Hello,
I am new to shell scripting. I am running UBUNTU at work and using BASH.
I have this script:
Code:
read M
read R
read T
A=$M+$R+$T
B=2000
if test A -gt B
then
echo "A is greater than 2000"
else
echo " A is 2000 or less"
fi
All I am trying to do is to add M, R and T arithmetically and store them in A and then I have to check if A is greater than 2000. If I have A=1 and B=2 and C=3 the value of A is equal to "1+2+3" and not six....
What do I have to do to fix the problem? I feel silly asking this question here but I have looked in books and on the web and what I try does not seem to work.