What is 'expect'

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Thu Nov 29 14:36:35 AEST 1990


In article <:E37D.6 at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
> In article <7316:Nov1408:33:0390 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> > Most ``interactive'' programs demand to talk to a tty; you'll have to
> > use a tool like pty (comp.sources.unix volume 23, or ftp 128.122.128.22)
> > to make them behave. But replacing ``telnet'' with ``pty telnet'' is a
> > lot simpler than learning a new language for automation.
> Of course TCL is a whole lot more portable than Perl or PTY. I can run
> TCL on Xenix-286, with no PTY drivers and a compiler that gets the dry
> heaves when faced with Perl.

Yes, and C is a whole lot more portable than TCL. I can run it on
practically every machine bigger than a Sinclair. So?

My point was that a tool is easier to use when you don't have to learn
an entirely new language for it. sh, despite its flaws, is the scripting
language of choice for most UNIX programmers; TCL and Perl are not (yet)
even close to as widely available. A tool like pty can be applied from
any language: sh, TCL, Perl, C, or whatever you like. Why bother
learning a new language just to take advantage of a system feature?

---Dan



More information about the Comp.unix.shell mailing list