#!/bin/sh

if [ x$PAGER = 'x' ]; then
   PAGER=/afs/sipb.mit.edu/project/outland/bin/less
fi

for f do
   case $f in
     *.gz)
        gunzip -c $f | $PAGER ;;
     *.Z)
	zcat $f | $PAGER ;;
     *.F)
	fcat $f | $PAGER ;;
     *)
	if [ -f $f ]; then
	   $PAGER $f
	elif [ -f ${f}.F ]; then
	   fcat ${f}.F | $PAGER
	elif [ -f ${f}.Z ]; then
	   zcat ${f}.Z | $PAGER
	elif [ -f ${f}.gz ]; then
	   gunzip -c ${f}.gz | $PAGER
	fi ;;
   esac
done
