$ cat hello.sh
#!/bin/sh
echo "Hello World"
$ chmod a+x hello.sh
$ ./hello.sh
-
#!/bin/sh
聲明腳本使用的解釋器 -
chmod a+x hello.sh
賦予腳本執(zhí)行權限 -
./hello.sh
從當前shell進程中妥泉,派生一個進程使用bash解釋器執(zhí)行腳本
$ cat hello.sh
#!/bin/sh
echo "Hello World"
$ chmod a+x hello.sh
$ ./hello.sh
#!/bin/sh
聲明腳本使用的解釋器chmod a+x hello.sh
賦予腳本執(zhí)行權限./hello.sh
從當前shell進程中妥泉,派生一個進程使用bash解釋器執(zhí)行腳本