Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: Error trap/detection question in sh Message-ID: <1991Apr3.211317.22708@athena.mit.edu> Date: 3 Apr 91 21:13:17 GMT References: <1991Apr2.202116.15411@mintaka.lcs.mit.edu> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 20 In article <1991Apr2.202116.15411@mintaka.lcs.mit.edu>, dbert@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710