Linux shell - 1 第一個腳本
參考教程 LinuxCommand.org
創建文件
touch ex1-1-first-script.sh
vim編輯器:
vim ex1-1-first-script.sh
#!/bin/bash
#first script
echo "Hello world"
更改執行權限 並執行 command
chmod 755 ex1-1-first-script.sh
./ex1-1-first-script.sh
執行結果
Hello World!
[1]: http://linuxcommand.org/ 原文