bash advanced 之 bash function define All In One
bash advanced 之 bash function define All In One
bash function define / bash 函数定义
function test () {}
#!/usr/bin/env bash
# function 定义
function test () {
echo "test function with keyword and ()"
}
test
function test {}
#!/usr/bin/env bash
# function 声明式
function test {
echo "test function with keyword"
}
test
test () {}
#!/usr/bin/env bash
# 命令式 ()
test (){
echo "test function with ()"
}
test
refs
https://github.com/xgqfrms/bash-all-in-one/issues/3#issuecomment-952500845
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/15469813.html
未经授权禁止转载,违者必究!