$ cat hello.sh
#!/bin/sh
echo "Hello World"
$ chmod a+x hello.sh
$ ./hello.sh
-
#!/bin/sh声明脚本使用的解释器 -
chmod a+x hello.sh赋予脚本执行权限 -
./hello.sh从当前shell进程中,派生一个进程使用bash解释器执行脚本
$ cat hello.sh
#!/bin/sh
echo "Hello World"
$ chmod a+x hello.sh
$ ./hello.sh
#!/bin/sh 声明脚本使用的解释器chmod a+x hello.sh 赋予脚本执行权限./hello.sh 从当前shell进程中,派生一个进程使用bash解释器执行脚本