Posts

Showing posts from May, 2016

form dialog | how to create userfriendly menu

Image
https://bash.cyberciti.biz/guide/The_form_dialog_for_input https://bash.cyberciti.biz/guide/Main_Page The  form dialog  displays data entry form which consisting of labels and fields. You can set the field length. An operator can use up/down arrows to move between fields and tab to move between windows. The syntax is as follows: dialog --form text height width formheight [ label y x item y x flen ilen ] Where, The field length flen and input-length ilen tell how long the field can be. If flen is zero, the corresponding field cannot be altered. and the contents of the field determine the displayed-length. If flen is negative, the corresponding field cannot be altered, and the negated value of flen is used as the displayed-length. If ilen is zero, it is set to flen. Example Create a shell script called useradd1.sh: #!/bin/bash # useradd1.sh - A simple shell script to display the form dialog on screen # set field names i.e. shell variables shell = "&quo