/contrib/dialog/samples/tailboxbg

https://bitbucket.org/freebsd/freebsd-head/ · Shell · 22 lines · 10 code · 7 blank · 5 comment · 0 complexity · 184a68dddb4db5b517483c70584e5cbf MD5 · raw file

  1. #!/bin/sh
  2. # $Id: tailboxbg,v 1.9 2010/01/13 10:20:03 tom Exp $
  3. . ./setup-vars
  4. . ./setup-tempfile
  5. ./killall listing
  6. ./listing >listing.out &
  7. $DIALOG --title "TAIL BOX" \
  8. --no-kill "$@" \
  9. --tailboxbg listing.out 24 70 2>$tempfile
  10. # wait a while for the background process to run
  11. sleep 10
  12. # now kill it
  13. kill -3 `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
  14. # ...and the process that is making the listing
  15. ./killall listing