linux shell 交互式gui

linux shell 交互式gui

帮助

whiptail --help

对话框1

whiptail --title "信息 title" --msgbox " 选择 确定 继续" 10 50

对话框1

whiptail --title “信息 title”" --yes-button “确定” --no-button “取消” --yesno " 选择 确定 继续?" 10 50

输入信息

whiptail --title "输入信息 title" --inputbox " 选择 确定 继续" 10 50

输入密码

whiptail --title "密码 title" --passwordbox " 选择 确定 继续" 10 50

菜单

whiptail --title "菜单 title" --menu "选择项" 10 50 3 \
"1" "1 test" \
"2" "2 test" \
"3" "3 test"
```
# 单选对话框
```
whiptail --title "菜单 title" --radiolist "选择项" 10 50 3 \
"1" "1 test" ON \
"2" "2 test" OFF \
"3" "3 test" OFF 
```
# 多选对话框
```
whiptail --title "菜单 title" --checklist "选择项" 10 50 3 \
"1" "1 test" ON \
"2" "2 test" ON \
"3" "3 test" OFF 
```

你可能感兴趣的:(linux,服务器)