#!/bin/sh
# qlog: view a queue log
# kh	version 1.0	9 August 1993
# kh	version 2.0	15 Dec 1993

usage='qlog: usage: qlog [ queue(s) ]'

#  spool directory
spool_dir=/tmp/spool

# what to do
doit() {
	more $spool_dir/${1:-q}/${1:-q}.log
}

# when to do it
if [ $# -eq 0 ]
    then doit 
    else for i 	do
		if [ ! -f $spool_dir/$i/$i.log ]; then
			echo "qlog: no log file for $i"; exit 2
		fi
		doit $i
	done
fi
