Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!indri!aplcen!bink From: bink@aplcen.apl.jhu.edu (Ubben Greg) Newsgroups: comp.sources.wanted Subject: Re: script for SYS V Summary: More verbose example using tee|sh|tee Message-ID: <1198@aplcen.apl.jhu.edu> Date: 6 May 89 02:59:58 GMT References: <8311@chinet.chi.il.us> <12637@ihlpy.ATT.COM> <1536@auspex.auspex.com> Reply-To: bink@aplcen.apl.jhu.edu (Greg Ubben) Organization: The Johns Hopkins University, Baltimore MD Lines: 17 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