Creating dialog boxes with the dialog utility
The dialog
utility is used to create a basic level graphical user interface. We can use this in Shell script to create very useful programs.
To install the dialog
utility in Debian or Ubuntu Linux, enter following command:
$ sudo apt-get update $ sudo apt-get install l dialog
Similarly, enter the following command to install the utility dialog in CentOS or Red Hat Linux:
$ sudo yum install dialog
The typical syntax of the dialog
command is as follows:
$ dialog --common-options --boxType "Text" Height Width \ --box-specific-option
The common-options
utility is used to set the background color, title, and so on in dialog boxes.
The option details are as follows:
- Text: The caption or contents of the box ...
Get Learning Linux Shell Scripting 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.