在shell脚本中定义的变量仅在脚本中有效,但使用如下的一些命令可以改变其作用域或属性:①export [option] [name[=value]]– 表明选项结束,所有后续参数都是实参。-f 表... [shell函数]
常用如下两个命令用于向终端打印信息:echoprintfecho命令常用于需要进行简单格式化的字符串打印;printf命令是Shell版本的C语言函数printf,它为格式化输出提供了高度的灵... [shell函数]
#!/bin/shhello(){echo “Hello there today ‘s date is `date`”}echo “now going to the function hello ”helloecho “back from the function ”... [shell函数]