re-directing 'rup' to a file

Don Libes libes at cme.nist.gov
Wed Mar 6 05:37:33 AEST 1991


In article <1991Mar05.080251.15424 at convex.com> tchrist at 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 at cme.nist.gov      ...!uunet!cme-durer!libes



More information about the Comp.unix.questions mailing list