shell 函数

标准语法(推荐的写法)
function 函数名() {
  指令... 
  return n 
}


简化写法1 (不推荐的写法,无括号)
function 函数名 {
  指令... 
  return n 
}


简化写法2
函数名() {
  指令... 
  return n 
}
原文地址:https://www.cnblogs.com/l10n/p/13136784.html