Appendix A. Appendix—Commands and Variables

This appendix is a listing of the commands, flags, and variables built into Expect (not including those provided by Tcl). The listing does not show the complete syntax for each command or flag; this is just an aid to jog your memory as to what is available. Alongside each entry is a brief description and a page number. The page number points to where the command is best described, not necessarily where it first or literally appears.

I have omitted information that is redundant (such as the timestamp substitutions which can all be found on the page which describes timestamp) and the debugger commands (which can be produced by pressing h while in the debugger). I have also omitted commands specific to C and C++ programming since that information is well confined to two short chapters. You can also find all of this in the index.

All of the commands shown here that do not start with "exp" are also callable with the "exp_" prefix. For instance, close can also be called as exp_close.

Commands And Flags

close

close spawned process

Page 101

         −i

         identify process

245

         -slave

         close slave of process

291

debug

control debugger

406

         -now

         start debugger immediately

407

         0 or 1

         stop or start debugger

406

disconnect

disconnect process from tty

371

exit

exit

35

         -onexit

         declare exit handler

317

         -noexit

         invoke exit handlers ...

Get Exploring Expect now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.