-
使用shell来执行
$ sh hello.sh
-
使用bash来执行
$ bash hello.sh
-
使用.来执行
$ . ./hello.sh
-
使用source来执行
$ source hello.sh
- 还可以赋予脚本所有者执行权限,允许该用户执行该脚本
$ chmod u+rx hello.sh
$ ./hello.sh
Shell基础--运行Bash脚本的方式
猜你喜欢
转载自blog.51cto.com/phpme/2329079
今日推荐
周排行