Terminal emulator for 6386 under UNIX(r)

a.v.reed avr at mtgzz.att.com
Thu Jan 12 10:11:01 AEST 1989


In article <563 at mccc.UUCP>, pjh at mccc.UUCP (Pete Holsberg) writes:
> In article <4861 at mtgzz.att.com> avr at mtgzz.att.com (a.v.reed) writes:
> =
> =In article <9877 at drutx.ATT.COM>, csr at drutx.ATT.COM (Steve Roush) writes:
> =>    For strictly interactive use, I use "cu". ....
> =>   I do not know of any UNIX programs outside of AT&T that allow scripting
> => of sessions as can be done under DOS.
> =
> =Oh yes you do, unless you've never heard of "tee".
> =Here is how you use tee to "script" a cu session:
> 
> I wondewr if the original poster wasn't talking about writing scripts
> that "drive" cu, the way that MSDOS programs such as ProYAM and ProComm
> have scripts that make the call, log you on, download messages, upload
> files, etc., without human intervention.  I's certainly like to see how
> to do that.

Fair enough - I was thinking of the (clearly redundant) BSD "script".
Here is what you want from standard UNIX tools. Let "dialog.cu" be a
shell script to do your thing. It "read"s from cu and "echo"s to it,
and after doing its job lets you continue by doing

	cat -u < $TTY &
	exec cat -u > $TTY

Start your session like this:

	TTY=`tty`
	export TTY
	mknod tocu p
	mknod fromcu p
	dialog.cu <fromcu >tocu &
	cu <tocu >fromcu

You can be more elaborate and check the fifos first and remove them
afterward etc., but I think the above should be enough to get you
started.
			Adam Reed (avr at mtgzz.ATT.COM)



More information about the Comp.unix.questions mailing list