/contrib/dialog/samples/menubox8

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 30 lines · 25 code · 3 blank · 2 comment · 3 complexity · 6633780b26dba90e2dd1513e9e2c2953 MD5 · raw file

  1. #!/bin/sh
  2. # $Id: menubox8,v 1.7 2010/01/13 10:34:32 tom Exp $
  3. . ./setup-vars
  4. exec 3>&1
  5. RESULT=`$DIALOG --help-button \
  6. --default-item "MSDOS" \
  7. --clear \
  8. --title "MENU BOX" "$@" \
  9. --menu "Hi, this is a menu box. You can use this to \n\
  10. present a list of choices for the user to \n\
  11. choose. If there are more items than can fit \n\
  12. on the screen, the menu will be scrolled. \n\
  13. You can use the UP/DOWN arrow keys, the first \n\
  14. letter of the choice as a hot key, or the \n\
  15. number keys 1-9 to choose an option.\n\
  16. Try it now!\n\n\
  17. Choose the OS you like:" 20 51 4 \
  18. "Linux" "The Great Unix Clone for 386/486" \
  19. "NetBSD" "Another free Unix Clone for 386/486" \
  20. "OS/2" "IBM OS/2" \
  21. "WIN NT" "Microsoft Windows NT" \
  22. "PCDOS" "IBM PC DOS" \
  23. "MSDOS" "Microsoft DOS" \
  24. 2>&1 1>&3`
  25. retval=$?
  26. exec 3>&-
  27. . ./report-string