|
|
1.1 root 1: :
2: #!/bin/sh
3:
4: if test "`echo -n a`" = "-n a"; then
5: # looks like a SysV system:
6: n1=''; n2='\c'
7: else
8: n1='-n'; n2=''
9: fi
10: if stty cbreak 2>/dev/null; then
11: cb='cbreak'; ncb='-cbreak'
12: else
13: # 'stty min 1' resets eof to ^a on both SunOS and SysV!
14: cb='min 1 -icanon'; ncb='icanon eof ^d'
15: fi
16: trap 'stty $ncb echo 2>/dev/null; exit' 2 3 5 10 13 15
17:
18: FIRST=1
19: for FILE
20: do
21: if test $FIRST -eq 0; then
22: echo $n1 "--More--(Next file: $FILE)$n2"
23: stty $cb -echo 2>/dev/null
24: ANS=`dd bs=1 count=1 2>/dev/null`
25: stty $ncb echo 2>/dev/null
26: echo " "
27: if test "$ANS" = 'e'; then
28: exit
29: fi
30: fi
31: if test "$ANS" != 's'; then
32: echo "------> $FILE <------"
33: gzip -cd "$FILE" | ${PAGER-more}
34: fi
35: if test -t; then
36: FIRST=0
37: fi
38: done
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.