/contrib/dialog/samples/programbox

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 19 lines · 13 code · 4 blank · 2 comment · 2 complexity · 6dce74d210fe58a28f60bee6b92f2681 MD5 · raw file

  1. #!/bin/sh
  2. # $Id: programbox,v 1.1 2011/03/02 01:17:28 tom Exp $
  3. . ./setup-vars
  4. . ./setup-tempfile
  5. ls -1 >$tempfile
  6. (
  7. while true
  8. do
  9. read text
  10. test -z "$text" && break
  11. ls -ld "$text"
  12. sleep 0.1
  13. done <$tempfile
  14. ) |
  15. $DIALOG --title "PROGRAMBOX" "$@" --programbox 20 70