shell/结构化命令/使用双圆括号.sh

12 lines
144 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
# using double parenthesis
var1=10
if (( $var1 ** 2 > 90))
then
(( var2 = $var1 ** 2))
echo "The square of $var1 if $var2"
fi