# uuq - a script to examine and display the Taylor spool directory contents.
# note - uses the uuname script or similar functionality.
SPOOLDIR
="/usr/spool/uucp"
-h) echo "uuq: usage uuq [options]"
echo " -l long listing (may take a while)"
echo " -s n run uuq only for system n"
echo " -d n delete item n from the queue (required -s)"
*) echo "uuq: invalid option"
if [ "${DELETE}" != "" ] && [ ${SINGLE} != 1 ] ; then
echo "uuq: you must specify a system to delete the job from:"
echo " uuq -s wizard -d D.0004"
# if we are deleting a job, then do that first and exit without showing
# any other queue information
if [ "${DELETE}" != "" ] ; then
if [ -d ${SYSTEMS}/D.
] ; then
if [ -f ${PACKET} ] ; then
EXFILE
=..
/D.X
/`awk '{if (NR == 2) print $2}' ${PACKET}`
DFILE
=..
/D.
/`awk '{if (NR == 1) print $2}' ${PACKET}`
echo "deleting job ${PACKET}"
echo "uuq: job ${PACKET} not found"
echo "uuq: system ${SYSTEMS} not found"
# use the 'uuname' script to obtain a list of systems for the 'sys' file,
# then step through each directory looking for appropriate information.
if [ ${LONG} -gt 0 ] ; then
echo -n "job# act size command"
for DESTSYSTEM
in ${SYSTEMS} ; do
# if there is an existing directory for the named system, cd into it and
if [ -d ${DESTSYSTEM} ] ; then
if [ "${PACKET}" != "" ] ; then
# if a long listing has been required, extra information is printed
# now each packet must be examined and appropriate information is
# printed for this system
if [ ${LONG} -gt 0 ] ; then
EXFILE
=..
/D.X
/`awk '{if (NR == 2) print $2}' ${PACKET}`
DFILE
=..
/D.
/`awk '{if (NR == 1) print $2}' ${PACKET}`
echo -n "${PACKET} " > ${TMPFILE}
gawk
'{if (NR == 2) printf(" %s ", $1);}' ${PACKET} >> ${TMPFILE}
ls -l ${DFILE}|
awk '{printf("%-10d ", $4)}' >> ${TMPFILE}
if [ -f ${EXFILE} ] ; then
gawk
'/U / {printf("(%s)", $2);}\
/C / {print substr($0,2,length($0));}' ${EXFILE} >> ${TMPFILE}
cat ${SPOOLDIR}/.Status
/${DESTSYSTEM}