@AquariusGX

QQ:651572770 加我请注明来意。 twitter: @aquariusgx

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Linux脚本有3中运行方式,以运行test.sh脚本为例。

 

1. 输入定向到Shell脚本,具体来讲就是利用输入重定向的机制,让Shell解释器顺次读取每一行脚本命令,进行执行。

bash > test.sh

 

2. 类似方法一,只不过它是以脚本文件名为参数的。

bash bash.sh

 

3. 将脚本文件设置成执行文件,直接在提示符下调用。

chmod u+x test.sh

./test.sh

 

posted on 2011-01-14 02:09  aquariusgx  阅读(13111)  评论(0编辑  收藏  举报