Version 6 (modified by wade, 15 years ago) (diff) |
---|
source
man bash
判斷式
0 表示正確。 1 表示錯誤。
a=11 test $a -lt 10 echo $?
a=$((a+1)) echo $a
function
function add() { echo $1 echo $2 } add 2 4
whiptail
產生對話式選單
whiptail --menu "test" 0 0 0 a1 "test a1" a2 "test a2"
做一個選單,test a1 選項結果為 a1, test a2 選項結果為 a2
whiptail --menu "test" 0 0 0 a1 "test a1" a2 "test a2" 2> tmp
將結果標準錯誤輸出至 tmp 內