On Unix or Linux use shell scripting If you could not calculate string, we can convert string to integer type,
EXPR command is help us for conversion. expr unix or linux system for doing arithmetic operations.
Give space between the values and the operands
For example set values like, string1=10; and string=20;
expr $string1 - $string2
or
$string3=`expr $string1 - $string2`
echo $string3
also do that like below,
echo $(( string1 - string2 ))
Comments (0)