shell腳本編程規範小案例-有趣的小例子!

1.編寫一個小腳本程序sumsquare.sh,計算兩個整數的平方和。例:執行sumsquare.sh 3 4時,輸出結果爲25 [[email protected] ~]# vi sumsquare.sh-1.0 #!/bin/bash #計算兩個整數的平方和 echo "$1和$2的平方和是" `expr $1 \* $1 + $2 \* $2`     ------上面這句也可以換成   e
相關文章
相關標籤/搜索