Forrest logo
back to the whiptail tool

whiptail:tldr:2d4e1

whiptail: Display a boolean choice, returning the result through the exit code.
$ whiptail --title "${title}" --yesno "${message}" ${height_in_chars} ${width_in_chars}
try on your machine

The command you provided is using the whiptail program to display a dialog box with a yes/no prompt. Let's break down the different components:

  • whiptail: whiptail is a program that allows you to create dialog boxes in the terminal. It is often used in shell scripts to provide a graphical-like interface for user interaction.

  • --title "${title}": This option sets the title of the dialog box. The value of ${title} is the variable that should contain the desired title text. Make sure to substitute the actual title you want to display.

  • --yesno "${message}": This option sets the message to be displayed in the dialog box. The value of ${message} is the variable that should contain the message text. Again, replace ${message} with the appropriate variable containing the intended message.

  • ${height_in_chars} and ${width_in_chars}: These variables represent the height and width of the dialog box in characters. You can replace ${height_in_chars} and ${width_in_chars} with the desired values (e.g., 10 50), indicating the number of rows and columns for the dialog box.

Overall, this command configures whiptail to display a dialog box with a title, a message, and a yes/no prompt. By adjusting the variables, you can customize the appearance and content of the dialog box.

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.
back to the whiptail tool