File: zmore

package info (click to toggle)
ncompress 4.2.4-9.2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 160 kB
  • ctags: 201
  • sloc: ansic: 1,441; makefile: 35
file content (22 lines) | stat: -rwxr-xr-x 319 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
:
#!/bin/sh

FIRST=1
for FILE
do
	if test $FIRST -eq 0; then
		echo "--More--(Next file: $FILE)\c"
		stty cbreak -echo
		ANS=`dd bs=1 count=1 2>/dev/null` 
		stty -cbreak echo
		echo " "
		if test "$ANS" = 'e'; then
			exit
		fi
	fi
	echo "------> $FILE <------"
	zcat $FILE | more
	if test -t; then
		FIRST=0
	fi
done