Error trap/detection question in sh

Jonathan I. Kamens jik at athena.mit.edu
Thu Apr 4 07:13:17 AEST 1991


In article <1991Apr2.202116.15411 at mintaka.lcs.mit.edu>, dbert at mole.gnu.ai.mit.edu (Douglas Siebert) writes:
|> where "pipe" is a named pipe created by "mknod pipe p"  I suppose I could add
|> something of the form 2>errorfile to trap errors and if the file is of positive
|> size assume something has occurred which I do not wish.  I am hoping for a
|> cleaner, better way though.  Any ideas?

  Get /pub/expect.shar.Z from ftp.uu.net, and write your script in expect
instead of trying to do it the way you are now; I suspect it'll be much
easier.  I believe you also need tcl to compile expect; tcl is available in
/pub/tcl.tar.Z on the same machine.

  If you want to find out what expect is all about, you can retrieve and print
out (after uncompressing it) the postscript file /pub/expect.ps.Z, which is
probably the paper that Don Libes presented about expect at a Usenix.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.shell mailing list