Listing 5
#
# showonite.sh: Version 2.0 2/27/92 by Leor Zolman
# Show ALL spooled overnight jobs
#
debug=N
NPRIORITIES=7
if [ $debug = Y ]; then
SPOOLDIR=.
else
SPOOLDIR=/usr/spool/onite
fi
JOBS=$SPOOLDIR/jobs
echo
echo "The following jobs are queued for overnight processing."
echo " (Jobs may only be cancelled by their owners)"
echo
echo " Jobname Owner Priority"
echo " ------- ----- --------"
echo
cd $JOBS
priority=1
while [ $priority -le $NPRIORITIES ]
do
l P$priority 2>/dev/null | tail +2 | awk '
{ printf " %-14s %-8s %d\n",
$9, $3, priority
}' priority=$priority
priority=`expr $priority + 1`
done
echo
exit 1 # causes rmenu to pause
|