Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cme!libes From: libes@cme.nist.gov (Don Libes) Newsgroups: comp.unix.questions Subject: Re: re-directing 'rup' to a file Message-ID: <11872@muffin.cme.nist.gov> Date: 5 Mar 91 19:37:33 GMT References: <1991Mar5.014821.1555@unixland.uucp> <1991Mar05.080251.15424@convex.com> Organization: National Institute of Standards and Technology Lines: 21 In article <1991Mar05.080251.15424@convex.com> tchrist@convex.COM (Tom Christiansen) writes: >: he is trying to do something like >: timeout 10 rup > rup.list >:When the timeout occurs, though, there is nothing in rup.list! >You need to get it to think its output is a tty. Dan will suggest >using pty. Nothing much short of hacking the source comes to mind. You can do this with expect. Here is a csh alias that allows your original "timeout ..." command to work correctly. alias timeout 'expect -c "set timeout \!:1; spawn \!:2; expect"' >While it's nice that pty should care of a lot of obnoxious things like >this, I think that this is just a hack around a problem caused by lack >of design forethought in stdio: you shouldn't need a whole pty just to >get line buffering! I agree. Don Libes libes@cme.nist.gov ...!uunet!cme-durer!libes