shell

Hello World

2019-01-12  本文已影响2人  时海观察者
$ cat hello.sh
#!/bin/sh
echo "Hello World"
$ chmod a+x hello.sh
$ ./hello.sh
  1. #!/bin/sh 声明脚本使用的解释器
  2. chmod a+x hello.sh 赋予脚本执行权限
  3. ./hello.sh 从当前shell进程中,派生一个进程使用bash解释器执行脚本
上一篇 下一篇

猜你喜欢

热点阅读