Xref: utzoo comp.unix.admin:510 comp.unix.questions:26874 comp.unix.shell:887 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cme!libes From: libes@cme.nist.gov (Don Libes) Newsgroups: comp.unix.admin,comp.unix.questions,comp.unix.shell Subject: Re: telnet in a shell script Message-ID: <8028@muffin.cme.nist.gov> Date: 14 Nov 90 09:44:54 GMT References: <3886@male.EBay.Sun.COM> <8026@muffin.cme.nist.gov> <7006:Nov1408:13:3290@kramden.acf.nyu.edu> Organization: National Institute of Standards and Technology Lines: 19 In article <7006:Nov1408:13:3290@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >One big advantage of the sh/pty version over Don's expect-based version >is that expect can't handle telnet job control. sh can't either, but at >least the user can type ``^]z'' to telnet followed by ``^Z'' to regain >his shell. expect does understand job control. (The man page explains all this.) By default, "interact" passes characters like ^Z and ^] to the interactive process (telnet, in this case) which is usually what is desired. If you want a csh you can suspend back to, just spawn a csh first. Or, if you want to suspend expect itself, just press the interact escape character and you'll get back to the expect interpreter from which you can suspend back to your shell by typing ^Z. (This is how telnet itself works, too.) Please, Dan, go ahead and talk about your own work, but stop trying to explain mine. You've done it an injustice every time. Do me a favor and don't even mention expect in your postings. Don Libes libes@cme.nist.gov ...!uunet!cme-durer!libes