w1100n
This site is best viewed in Google Chrome
10/28/2019 17:43

[ function ] funname [()]
{
    action;
    [return int;]
}
# 定义函数 fun0
fun0(){
    echo "run fun0 "
}
# 调用函数 fun0
fun0

# 定义带参数的函数 fun0
fun0(){
    echo "run fun0 $1 "
}
# 调用带参数的函数 fun0
fun0 foo

https://www.runoob.com/linux/linux-shell-func.html
https://wiki.jikexueyuan.com/project/shell-tutorial/shell-function-parameter.html

<< Previous Posts Newer Posts >>
辽ICP备14012896