使用双圆括号

5年以前  |  阅读数:471 次  |  编程语言:Shell 
#!/bin/bash
# using double parenthesis

var1=10

if (( $var1 ** 2 > 90))
then 
    (( var2 = $var1 ** 2))
    echo "The square of $var1 if $var2"
fi

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8