start to STAR

2012年7月22日 星期日

Bash Script - If...Else


read -p "Please enter your option:" option
if [ "$option" == "1" ]; then
      echo "test 1"
elif [ "$option" == "2" ]; then
      echo "test 2"
elif [ "$option" == "3" ]; then
      echo "test 3" 
else
      echo "Please enter correct option!"
fi
於 晚上10:47
標籤: Bash Script
較新的文章 首頁

搜尋此網誌

標籤

  • Bash Script
  • Git
  • Python
  • Sublime
  • Ubuntu
  • Windows

網誌存檔

  • ►  2021 (2)
    • ►  2月 (1)
    • ►  1月 (1)
  • ►  2020 (3)
    • ►  5月 (1)
    • ►  4月 (2)
  • ►  2019 (1)
    • ►  9月 (1)
  • ►  2017 (1)
    • ►  11月 (1)
  • ►  2016 (2)
    • ►  12月 (1)
    • ►  6月 (1)
  • ▼  2012 (11)
    • ►  8月 (1)
    • ▼  7月 (10)
      • Bash Script - default value
      • Bash Script - Random select element from array
      • Bash Script - check argument in array
      • Bash Script - 陣列及for迴圈範例
      • Ubuntu - 列出所有相關process, 排除字元, 捷取欄位, kill process
      • Ubuntu - MD5 generate and check
      • Windows - Bat Script - for 迴圈 (由0印到10)
      • Ubuntu - Some Linux Command
      • Bash Script - Read file for bash
      • Bash Script - If...Else
頂尖企業主題. 技術提供:Blogger.