Sunday, August 3, 2014
4:37 PM

Creating message box in a shell script

Shell scripts are generally assumed to be restricted to using only the command line for interaction with the user and lacks the graphical user interfaces available in the GUI mode.

One way of creating small GUIs in shell scripts is by the use of whiptail.

Here is how we can create a message box using whiptail. To create a message box we need to use the option --msgbox.

syntax:



example



The above command will create a message box of 10 X 20 with the text hello in it as shown below.

 photo whip_tail_msgbox.png

By default the text that appears for exiting the message box is OK.

We can changet the text using the option --ok-button



 photo whiptail_ok_button.png



Example script




0 comments:

Post a Comment