]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/dialog/samples/inputbox7
Import CK as of commit b19ed4c6a56ec93215ab567ba18ba61bf1cfbac8
[FreeBSD/FreeBSD.git] / contrib / dialog / samples / inputbox7
1 #!/bin/sh
2 # $Id: inputbox7,v 1.7 2010/01/13 10:20:03 tom Exp $
3 # An example which produces two widget outputs.
4
5 . ./setup-vars
6
7 MSG='Hi, this is an input dialog box. You can use \n
8 this to ask questions that require the user \n
9 to input a string as the answer. You can \n
10 input strings of length longer than the \n
11 width of the input box, in that case, the \n
12 input field will be automatically scrolled. \n
13 You can use BACKSPACE to correct errors. \n\n
14 Try entering your name below:'
15
16 # separate with a line-break (newline)
17 SEP='
18 '
19
20 exec 3>&1
21 RESULT=`$DIALOG --title "INPUT BOX" --clear --separate-widget "$SEP" "$@" \
22         --inputbox "$MSG" 16 51 \
23         --title "ANOTHER INPUT BOX" \
24         --inputbox "$MSG" 16 51 \
25 2>&1 1>&3`
26 retval=$?
27 exec 3>&-
28
29 . ./report-string