whiptail:tldr:bb81a
whiptail: Customise the text on the yes / no buttons.
$ whiptail --title "${title}" --yes-button "${text}" --no-button "${text}" --yesno "${message}" ${height_in_chars} ${width_in_chars}
try on your machine
This command uses the "whiptail" utility to display a dialog box with a message and options for the user to choose from. Here's a breakdown of the command:
whiptail
: This is the executable command used to call the "whiptail" utility.--title "${title}"
: This option sets the title of the dialog box. The value of thetitle
variable is substituted here.--yes-button "${text}"
: This option sets the text for the "yes" button in the dialog box. The value of thetext
variable is substituted here.--no-button "${text}"
: This option sets the text for the "no" button in the dialog box. Again, the value of thetext
variable is substituted here.--yesno "${message}"
: This option sets the message to be displayed in the dialog box. The value of themessage
variable is substituted here.${height_in_chars}
: This specifies the height (in characters) of the dialog box.${width_in_chars}
: This specifies the width (in characters) of the dialog box.
Overall, this command generates a dialog box with a specified title, message, "yes" button text, and "no" button text. The user can then choose either "yes" or "no" as a response.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.