ISC UNIX 2.2 & tape drive

Rick Richardson rick at pcrat.uucp
Wed Jul 25 22:26:22 AEST 1990


In article <852 at mwtech.UUCP> martin at mwtech.UUCP (Martin Weitzel) writes:
>If scrolling of the console screen is the problem, here is some
>workaround% which would keep the tape streaming.
>%: Yes, yes I know all what you want to comment on it and I promise
>I'll write it in C and with curses and make it more portable ...
>some day  1/2:-)

How about using shell and 'tput'?  The 'expr's will crank up
process ID's pretty quick, but it isn't hardwired to escape
sequences anymore.  Korn shell, or passing the escapes into awk
with HOME="$home" and the like can get rid of the expr's,
if you care.

n=0
lines=`tput lines`
clear=`tput clear`
home=`tput home`
limit=`expr $lines - 3`
(backup program) | while read a
do
	if [ `expr $n % $limit` -eq 0 ]
	then
		echo "${home}${clear}Backup in progress ..."
	fi
	echo "$n:	$a"
	n=`expr $n + 1`
done
echo "... Done ($n files)"

-Rick

-- 
Rick Richardson | Looking for FAX software for UNIX/386 ??? Ask About: |Mention
PC Research,Inc.| FaxiX - UNIX Facsimile System (tm)                   |FAX# for
uunet!pcrat!rick| FaxJet - HP LJ PCL to FAX (Send WP,Word,Pagemaker...)|Sample
(201) 389-8963  | JetRoff - troff postprocessor for HP LaserJet and FAX|Output



More information about the Comp.unix.i386 mailing list