[net.sources] Shell script to display uucp status files more readably

msb@lsuc.UUCP (Mark Brader) (12/20/84)

When having a problem with uucp, and at other times, I often find myself
looking at the status files (/usr/spool/uucp/STST.*), and being annoyed
that the timestamp in the files isn't in human-readable form.  But the
file's time updated will be the same, and ls -l gives me that.  So I
wrote the following little /bin/sh script and manual section to select the
fields that are usually of interest, and just display those.

[Sorry about the unusual triple-posting, but I thought this combination
 seemed most appropriate.  It contains source, but not many lines;
 it is of interest to readers of the other two groups, I hope.]

Mark Brader
---------------------------------- CUT HERE -------------------------------
# Run this file through /bin/sh.
# when done, Done. will appear.
echo Extracting uust
cat <<"YOU!ARE!TRANSFIXED!BY!THE!FLOATING!EYE" >uust
cd /usr/spool/uucp
STSTfiles=`echo " ${*-*}" | sed 's/ / STST./g'`
for sys in `ls $STSTfiles 2>&1 | grep -v "not found"`
	do
	set X`ls -l $sys`
	sed "s/^[^ ]* [^ ]* [^ ]*/$7 $5 $6/" $sys
	done
YOU!ARE!TRANSFIXED!BY!THE!FLOATING!EYE
echo Extracting uust.1
cat <<"THE!XORN!SCORED!AN!EXCELLENT!HIT!ON!YOU" >uust.1
.TH Uust 1C
.SH NAME
uust \- check communication status files
.SH SYNOPSIS
.B uust
[ system ... ]
.SH DESCRIPTION
.I Uust
prints the communication status, and the time it was updated,
for one or more remote systems.
The status is checked for the named
.I systems,
or if no arguments are given, then all existing status files are checked.
Systems are listed alphabetically.
.PP
If there is no response for a given system, either the
.I system
argument was given incorrectly or communication has terminated normally.
A status of TALKING generally means that a file is being transferred now.
CONVERSATION means that a connection is just being set up now;
this should only appear briefly, so if the time shown is more than
2 minutes ago, there is at least temporary trouble.
Anything else also indicates at least temporary trouble.
.SH FILES
/usr/spool/uucp/STST.*
.SH "SEE ALSO"
uucp(1), uux(1), mail(1), readnews(1), postnews(1), rn(1), Rnmail(1), Pnews(1)
.SH AUTHOR
Mark Brader
.SH BUGS
There is no checking that the arguments are actually system names.
.SH NOTES
.I Uust
is implemented by a shell script about one-sixth the size of this document.
THE!XORN!SCORED!AN!EXCELLENT!HIT!ON!YOU
echo Done.
exit 0