/contrib/dialog/samples/msgbox4-8bit

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 31 lines · 21 code · 8 blank · 2 comment · 2 complexity · de1a6570350b9dfe79daba97ee697a61 MD5 · raw file

  1. #!/bin/sh
  2. # $Id: msgbox4-8bit,v 1.4 2010/01/13 10:20:03 tom Exp $
  3. . ./setup-vars
  4. . ./testdata-8bit
  5. width=30
  6. while test $width != 61
  7. do
  8. $DIALOG --title "MESSAGE BOX (width $width)" --no-collapse --colors "$@" \
  9. --msgbox "\
  10. This sample uses characters which are non-printing in POSIX locale.
  11. \Z1`./rotated-data 0 $SAMPLE` \Z2`./rotated-data 1 $SAMPLE` \Z3`./rotated-data 2 $SAMPLE` \Z4`./rotated-data 3 $SAMPLE`\Zn
  12. Hi, this is a simple message box. You can use this to \
  13. display any message you like. The box will remain until \
  14. you press the ENTER key." 22 $width
  15. retval=$?
  16. case $retval in
  17. $DIALOG_CANCEL)
  18. echo "Cancel pressed.";exit;;
  19. $DIALOG_ESC)
  20. echo "ESC pressed.";exit;;
  21. esac
  22. width=`expr $width + 1`
  23. done