Shell 函数
linux shell 可以用户定义函数,然后在shell脚本中可以随便调用。
shell中函数的定义格式如下:
[ function ] funname [()] { action; [return int;] }
#!/bin/bash sum(){ echo $(($1+$2)) } sum 5 6
(17)shell函数
原文:http://www.cnblogs.com/songyu1015/p/7663682.html