Hello World
2019-01-12 本文已影响2人
时海观察者
$ 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解释器执行脚本