1217309Snwhitehorn#!/bin/sh 2217309Snwhitehorn# $Id: textbox2,v 1.8 2010/01/13 10:36:49 tom Exp $ 3217309Snwhitehorn 4217309Snwhitehorn. ./setup-vars 5217309Snwhitehorn 6217309Snwhitehorn. ./setup-tempfile 7217309Snwhitehorn 8217309Snwhitehorncat << EOF > $tempfile 9217309SnwhitehornHi, this is a text dialog box. It can be used to display text from a file. 10217309SnwhitehornThe file should not contain any 'tab' characters, so you should 'expand' 11217309Snwhitehornthe file first if it contains 'tab' characters. 12217309Snwhitehorn 13217309SnwhitehornIt's like a simple text file viewer, with these keys implemented: 14217309Snwhitehorn 15217309SnwhitehornPGDN/SPACE - Move down one page 16217309SnwhitehornPGUP/'b' - Move up one page 17217309SnwhitehornENTER/DOWN/'j' - Move down one line 18217309SnwhitehornUP/'k' - Move up one line 19217309SnwhitehornLEFT/'h' - Scroll left 20217309SnwhitehornRIGHT/'l' - Scroll right 21217309Snwhitehorn'0' - Move to beginning of line 22217309SnwhitehornHOME/'g' - Move to beginning of file 23217309SnwhitehornEND/'G' - Move to end of file 24217309Snwhitehorn'/' - Forward search 25217309Snwhitehorn'?' - Backward search 26217309Snwhitehorn'n' - Repeat last search (forward) 27217309Snwhitehorn'N' - Repeat last search (backward) 28217309Snwhitehorn 29217309Snwhitehorn 30217309SnwhitehornThe following is a sample text file: 31217309Snwhitehorn 32217309Snwhitehorn 33217309SnwhitehornEOF 34217309Snwhitehorn 35217309SnwhitehornTEXT=/usr/share/common-licenses/GPL 36217309Snwhitehorntest -f $TEXT || TEXT=../COPYING 37217309Snwhitehorn 38217309Snwhitehorncat $TEXT | expand >> $tempfile 39217309Snwhitehorn 40217309Snwhitehorn$DIALOG --clear --title "TEXT BOX" "$@" --textbox "$tempfile" 0 0 41217309Snwhitehorn 42217309Snwhitehornretval=$? 43217309Snwhitehorn 44217309Snwhitehorn. ./report-button 45