最佳答案:shell声明一个函数,只需要键入以下语法:function_name () {list of commands}shell之 函数(Function)函数在脚本中出现的次序是任意的,会按照脚本调用次