3 # Bzmore wrapped for bzip2,
4 # adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
6 PATH
="/usr/bin:$PATH"; export PATH
8 prog
=`echo $0 | sed 's|.*/||'`
14 if test "`echo -n a`" = "-n a"; then
15 # looks like a SysV system:
20 oldtty
=`stty -g 2>/dev/null`
21 if stty
-cbreak 2>/dev
/null
; then
22 cb
='cbreak'; ncb
='-cbreak'
24 # 'stty min 1' resets eof to ^a on both SunOS and SysV!
25 cb
='min 1 -icanon'; ncb
='icanon eof ^d'
27 if test $?
-eq 0 -a -n "$oldtty"; then
28 trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
30 trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
35 echo usage
: $prog files...
37 bzip2 -cdfq |
eval $more
43 if test $FIRST -eq 0; then
44 echo $n1 "--More--(Next file: $FILE)$n2"
45 stty
$cb -echo 2>/dev
/null
46 ANS
=`dd bs=1 count=1 2>/dev/null`
47 stty
$ncb echo 2>/dev
/null
49 if test "$ANS" = 'e' -o "$ANS" = 'q'; then
53 if test "$ANS" != 's'; then
54 echo "------> $FILE <------"
55 bzip2 -cdfq "$FILE" |
eval $more