method(){
echo "funtion method"
}
method
method2(){
echo "$1"
echo "$2"
}
method2 1 2
method3(){
echo "$1 and $2"
return $(($1 + $2))
}
method3 10 20
echo $? #返回上一行的结果
Linux shell 语法-函数
最新推荐文章于 2024-11-01 11:12:48 发布