shell脚本执行方法及差异
2011-09-10 00:54
423 查看
之前知道用./来执行shell脚本,今天才知道还有. 【】也可以执行,并且:用./来执行的脚本,在脚本内定义的宏或变量只在本shell内有效;用.【】来执行的shell,在该shell内定义的宏或变量对全局有效。所以,当我们写配置路径的shell脚本时,必须用.【】来执行(我就是因为碰到这个问题才知道这个区别的,大家要注意哦!)
相关文章推荐
- ssh远程执行命令方法和Shell脚本实例
- 在Oozie 中调度执行shell、hive 脚本,以及通过shell脚本执行hive/sqoop/shell脚本的方法
- Shell脚本避免重复执行的方法
- Linux中执行shell脚本的4种方法总结
- Shell脚本中执行sql语句操作mysql的5种方法
- 执行shell脚本的多种方法及重要区别---摘取自“老男孩linux运维培训”(自己通过视频整理)
- 在执行shell脚本时,出现“syntax error : unexpected end of file"错误的解决方法
- linux crontab 无法执行shell脚本解决方法
- ssh远程执行命令方法和Shell脚本实例
- shell脚本的三种执行方法
- python在linux中执行shell脚本的方法
- Android脱离USB执行Shell脚本的方法
- Linux中执行shell脚本的4种方法总结
- Linux中执行shell脚本的4种方法总结
- shell脚本直接执行没有问题,crontab定时执行失败的解决方法
- Linux中执行shell脚本的4种方法总结
- bash shell脚本执行的几种方法
- shell脚本中切换用户执行相应的命令或者shell脚本的方法
- Shell脚本执行时出现declare: not found的解决方法
- ubuntu终端执行shell脚本报command not found解决方法