Creating a message box (msgbox) with a title

Enter the following command to create a message box with the following title:

$ dialog --title "Hello" --msgbox 'Hello world!' 6 20 

The option details are as follows:

  • --title "Hello": This will set the title of the message box to "Hello"
  • --msgbox 'Hello world!': This will set the content of the message box to "Hello world!"
  • 6: This will set the height of the message box
  • 20: This will set the width of message box:

The message box has a Hello title with content Hello World! It has a single OK button. We can use this message box to inform the user about any events or information. The user will have ...

Get Learning Linux Shell Scripting - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.