mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
13 lines
150 B
Bash
13 lines
150 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# using double parenthesis
|
||
|
|
||
|
var1=10
|
||
|
|
||
|
if (($var1 ** 2 > 90))
|
||
|
then
|
||
|
((var2 = $var1 ** 2))
|
||
|
echo "The square of $var1 if $var2"
|
||
|
fi
|
||
|
|