wiki:wade/linux/bash

Version 3 (modified by wade, 15 years ago) (diff)

--

source

man bash

arg1 op arg2

a=11
test $a -lt 10
echo $?
a=$((a+1))
echo $a

==

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 內