Pages

Showing posts with label whiptail. Show all posts
Showing posts with label whiptail. Show all posts

Saturday, April 15, 2017

The whiptail tool .

This command let you deal with many display dialog boxes from shell scripts.
The command is named whiptail and you can read and see simple examples with this command here.

Note: --infobox is almost useless in an xterm, because whiptail writes to the other screen xterm makes available but you can use the --msgbox

The tutorial of this day will show you how to put the text from a text file to the screen.
First, you need a text file with a size of your shell screen and this will be used by this command.
For example, I used this text from Wikipedia into my text file named greeting.txt, see content :

The Paschal Greeting, also known as the Easter Acclamation, is an Easter custom among Eastern Orthodox, Oriental Orthodox, and Eastern Catholic Christians. Instead of "hello" or its equivalent, one is to greet another person with "Christ is Risen!" or "The Lord is Risen!", and the response is "Truly, He is Risen," "Indeed, He is Risen," or "He is Risen Indeed" - compare Matthew 27:64, Matthew 28:6 7, Mark 16:6, Luke 24:6, Luke 24:34 In some cultures, such as in Russia and Serbia, it is also customary to exchange a triple kiss of peace on the alternating cheeks after the greeting. Similar responses are also used in the liturgies of other Christian churches, but not so much as general greetings.

To use the whiptail command just use this into your shell:
[mythcat@localhost ~]$ whiptail --textbox  /dev/stdin  19 59  <<<"$(cat greeting.txt)"
The output of this command can be seen into next image: