74

shell函数基础-惠鹏刚的博客-51CTO博客

 6 years ago
source link: http://blog.51cto.com/11726212/2068683
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
有关函数的重要说明:执行shell函数时,函数名前的function和函数名后面的小括号都不要;函数的定义必须要在执行的程序前面定义或加载shell执行系统中各种程序的执行顺序为:系统别名-->函数-->系统命令-->可执行文件函数执行时,会和调用它的脚本共用变量,也可以为函数设置局部变量及特殊位置参数在shell函数里面,return命令的功能与exit类似,return的作用

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK