/contrib/dialog/samples/inputbox1

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 23 lines · 15 code · 6 blank · 2 comment · 0 complexity · 3316606f91a7d525a9349262121a73c5 MD5 · raw file

  1. #!/bin/sh
  2. # $Id: inputbox1,v 1.13 2010/01/13 10:20:03 tom Exp $
  3. . ./setup-vars
  4. . ./setup-tempfile
  5. $DIALOG --cr-wrap \
  6. --title "INPUT BOX" --clear \
  7. --inputbox "$@" \
  8. "Hi, this is an input dialog box. You can use
  9. this to ask questions that require the user
  10. to input a string as the answer. You can
  11. input strings of length longer than the
  12. width of the input box, in that case, the
  13. input field will be automatically scrolled.
  14. You can use BACKSPACE to correct errors.
  15. Try entering your name below:" 0 0 2> $tempfile
  16. retval=$?
  17. . ./report-tempfile