May 2018
Beginner
332 pages
7h 28m
English
Whenever we want to ask a user to input text via the keyboard, in such situations, the inputbox option is useful. While entering text via the keyboard, we can use keys such as Delete, Backspace, and the arrow cursor keys for editing. If the input text is larger than the input box, the input field will be scrolled. Once the OK button is pressed, the input text can be redirected to a text file:
# dialog --inputbox "Please enter something." 10 50
2> /tmp/tempfile
VAR=`cat ~/work/output.txt

Let's write the dialog_02.sh shell script to create an input box as follows:
#!/bin/bash result="output.txt" >$ $result # Create ...