2019-05-10 11:17:57 +08:00
|
|
|
#!/bin/bash
|
2019-10-10 08:56:31 +08:00
|
|
|
|
2019-05-10 11:17:57 +08:00
|
|
|
# using double parenthesis
|
|
|
|
|
|
|
|
var1=10
|
|
|
|
|
2019-10-10 08:56:31 +08:00
|
|
|
if (($var1 ** 2 > 90))
|
|
|
|
then
|
|
|
|
((var2 = $var1 ** 2))
|
|
|
|
echo "The square of $var1 if $var2"
|
2019-05-10 11:17:57 +08:00
|
|
|
fi
|
|
|
|
|