DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: T u

⟦4c6aebf58⟧ TextFile

    Length: 1481 (0x5c9)
    Types: TextFile
    Names: »uulog«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/bin/uulog« 

TextFile

#!/bin/sh
#
# usage:
# 	uulog
# or	uulog foo
# or	uulog -sfoo
# or	uulog -s foo
# or	uulog -ffoo
# or	uulog -f foo
#
#	-x means check the execute file
#	-nnn where 'nnn' is a number, will do tail -nnn
#

Myname=`basename "$0"`
PATH=/usr/ucb:/bin:/usr/bin
LOGDIR=/usr/spool/uucp/.Log
type=uucico
n=""

cd $LOGDIR

while [ $# -gt 0 ]
do
	case $1 in
	-x)	type=uuxqt
		shift
		;;

	-[0-9]*)n=`expr "$1" : '^-\(.*\)$'`
		shift
		;;

	-f)	fflag=1
		shift
		if [ $# -eq 0 ]
		then
			echo "$Myname: system name must follow -f flag" 1>&2
			exit 1
		else
			case "$1" in
			-*)
				echo "$Myname: system name must follow -f flag" 1>&2
				exit 1
				;;
			esac
		fi
		;;

	-f*)	x=`expr "$1" : '^-f\(.*\)'`
		shift
		set - $x $*
		fflag=1
		;;

	-s)	shift
		if [ $# -eq 0 ]
		then
			echo "$Myname: system name must follow -s flag" 1>&2
			exit 1
		else
			case "$1" in
			-*)
				echo "$Myname: system name must follow -s flag" 1>&2
				exit 1
				;;
			esac
		fi
		;;

	-s*)	x=`expr "$1" : '^-s\(.*\)'`
		shift
		set - $x $*
		;;

	-*)	echo "$Myname: usage: $Myname [-x] [-nnn] [-f system] [-s system] [system...]" 1>&2
		exit 1
		;;

	*)	sys="$sys $1"
		shift
		;;

	esac
done

set - $sys
if [ x$fflag = x ]; then
	if [ $# = 0 ]; then
		set - `ls $type`
	fi
	for i
	do
		if [ x$n = x ]; then
			cat $type/$i
		else
			tail -$n $type/$i
		fi
	done
else
	if [ $# != 1 ]; then
		echo "$Myname: exactly one system can be given with -f" 1>&2
		exit 2
	fi
	exec tail -${n}f $type/$1
fi
exit 0