pete@tutor.UUCP (Peter Schmitt) (10/20/88)
Is there a System V version of script available from somewhere? -- \\\!/// Peter Schmitt _ _ UUCP: decwrl!tsc.dnet!tutor!pete ( Q Q ) .or. att!tsc!tutor!pete ---,,,,-------U-------,,,,--- ARPA: tutor!pete%tsc.dec.com@decwrl.dec.com
pjh@mccc.UUCP (Pete Holsberg) (02/07/89)
Is there a SysV version of script available? If so, could someone please mail a copy or point me to an archive site that carries it? Thanks. Pete -- Pete Holsberg UUCP: {...!rutgers!}princeton!mccc!pjh Mercer College CompuServe: 70240,334 1200 Old Trenton Road GEnie: PJHOLSBERG Trenton, NJ 08690 Voice: 1-609-586-4800
chip@ateng.ateng.com (Chip Salzenberg) (02/10/89)
[ Followups to comp.sources.d ]
According to pjh@mccc.UUCP (Pete Holsberg):
>Is there a SysV version of script available?
For those of you who don't know what script is: A script program records
the screen output of an interactive session into a file.
I've just sent my System V script program to Rich Salz for distribution in
comp.sources.unix. If you absolutely can't wait, mail me at an address in
my signature, and I'll mail a copy.
By the way: You'll need ptys (pseudo-ttys) to use my version of script. If
you don't have ptys, find the public-domain pty device driver; that's what I
use.
The reason why this is cross-posted to comp.unix.xenix: Users SCO Xenix/386
2.3, you already have ptys, albeit undocumented. So my script program will
work on your system.
--
Chip Salzenberg <chip@ateng.com> or <uunet!ateng!chip>
A T Engineering Me? Speak for my company? Surely you jest!
"It's no good. They're tapping the lines."
gag@chinet.chi.il.us (Gregory A. Gulik) (04/27/89)
Does anyone have source for a 'script' like program for SYS V? I've seen it on BSD systems, but I can't find the equivalent on SYS V. Thanks, greg -- Gregory A. Gulik gag@chinet.chi.il.us -or- gulik@depaul.edu
wolfordj@ihlpy.ATT.COM (452is-Wolford) (05/02/89)
From article <8311@chinet.chi.il.us>, by gag@chinet.chi.il.us (Gregory A. Gulik): > Does anyone have source for a 'script' like program for > SYS V? I've seen it on BSD systems, but I can't > find the equivalent on SYS V. > > Thanks, > > greg > > > -- > Gregory A. Gulik > gag@chinet.chi.il.us > -or- > gulik@depaul.edu The easiest was is to do a "tee | sh prog | tee" with some options here is what I use: tee -i -a file.log | sh prog | tee -i -a file.log the -i causes interrupts to be ignored, end tee with a ^D and the -a says to append to the log file. The first tee makes a copy of standard in and passes it along as input to prog, the second tee takes the output, makes a copy and sends it to std out (usualy the terminal). The "sh prog" is if the prog needs to run under a different shell than you are currently running. If the current shell you are running is ok, then skip the "sh" part of the "sh prog". This will work in UN*X System V Release 2.0, 3.0, 3.1 and 3.2. As always, questions send mail to: Jeff Wolford att!iwsag!jww att!ihlpy!wolfordj harvard-+ | ucbvax--+---- att --+ iwsag!jww | decvax--+
guy@auspex.auspex.com (Guy Harris) (05/03/89)
>> Does anyone have source for a 'script' like program for >> SYS V? > >The easiest was is to do a "tee | sh prog | tee" with some options As long as you don't care if you can run "full-screen" programs (e.g., screen editors such as "vi" or EMACS) under it and have them work normally. The nice thing about "script" is that it uses pseudo-ttys, which most programs that care about ttys can't tell from real ttys; therefore, they act just as they do when run from a "real" terminal. Many of the times I've used "script" I've done so because I wanted to track down a bug in the display management portion of a full-screen program, so the fact that those programs work under "script" was very important. Unfortunately, vanilla S5 doesn't have pseudo-ttys (with the possible exception of S5R3.2, and the future exception of S5R4 - the latter should have "script" as a standard component), so you're stuck with pipes.
lmb@beta.lanl.gov (Larry Barrick) (05/03/89)
In article <1536@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>> Does anyone have source for a 'script' like program for >>> SYS V? >Unfortunately, vanilla S5 doesn't have pseudo-ttys (with the possible Sources for ptys for S5 and for script were recently posted to the net. I successfully fitted these to an SCO Xenix system running on a 286 with no mods required. E-mail me at lmb@beta.lanl.gov if you want the shell archives. Regards, LARBAR lmb@beta.lanl.gov
bink@aplcen.apl.jhu.edu (Ubben Greg) (05/06/89)
Here is a slightly more detailed version of Mr. Wolford's idea for simulating
the BSD "script" command on System V Unix. It mimics the real script command
better, though it still doesn't solve the problem with tty-oriented applica-
tions. Might be useful for producing examples for users manuals...
As Mr. Barrick says, do it the right way and get the PD pseudo-tty code.
script() {
set -- ${1:-typescript}
echo "Script started, file is $1"
echo "Script started on `date`" >$1
tee -a -i $1 | ${SHELL:-sh} -i 2>&1 | tee -a -i $1
echo "Script done on `date`" >>$1
echo "Script done, file is $1"
}
-- Greg Ubben
bink@aplcen.apl.jhu.edu