whiptail
Display text-based dialog boxes from shell scripts. See also:
dialog,gum. More information: https://manned.org/whiptail.
- Display a simple message:
whiptail --title "" --msgbox ""
- Display a boolean choice, returning the result through the exit code:
whiptail --title "" --yesno ""
- Customize the text on the yes/no buttons:
whiptail --title "" --yes-button "" --no-button "" --yesno ""
- Display a text input box:
="$(whiptail --title "" --inputbox "" 3>&1 1>&2 2>&3)"
- Display a password input box:
="$(whiptail --title "" --passwordbox "" 3>&1 1>&2 2>&3)"
- Display a multiple-choice menu:
=$(whiptail --title "" --menu "" 3>&1 1>&2 2>&3)
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
