Linux Bash Script
今天我想分享如何用linux shell script 語法。
我們需要加這個在script裡面,然後檔案改成.sh
1 | #! /bin/bash |
- How to execute script
chmod 777 myscript.sh
./myscript.sh
1. variable
define variable
1 | text1=Hello |
output:
Hello CC
read and echo variable
read variable
read a
read vairable without skip new line:
read -p “Your Options: “ option