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
.
|
close spawned process |
Page 101 |
|
identify process |
245 |
|
close slave of process |
291 |
|
control debugger |
406 |
|
start debugger immediately |
407 |
|
stop or start debugger |
406 |
|
disconnect process from tty |
371 |
|
exit |
35 |
|
declare exit handler |
317 |
|
invoke exit handlers but do not exit |
317 |
|
exit with this value |
35 |
|
continue |
142 |
|
do not restart internal timer |
144 |
|
control internal diagnostics |
162 |
|
return state |
178 |
|
direct diagnostics to file |
169 |
|
stop or start diagnostics |
167 |
|
open spawned process as file identifier |
300 |
|
identify process |
300 |
|
leave spawned process accessible |
301 |
|
return process id |
300 |
|
identify process |
300 |
|
return version of Expect |
522 |
|
exit if version mismatch |
522 |
|
version needed by script |
522 |
|
wait for pattern |
72 |
|
match timeout |
94 |
|
match eof |
98 |
|
match full buffer |
149 |
|
match timeout or eof |
101 |
|
match null |
153 |
|
arguments are braced |
158 |
|
glob pattern |
109 |
|
regular expression |
109 |
|
exact string |
132 |
|
do not update internal buffer |
151 |
|
treat input as all lowercase |
137 |
|
identify process |
243 |
|
save indices of match |
123 |
|
pattern action pairs |
75 |
|
wait for pattern before others |
255 |
same flags as for | ||
|
return patterns of all spawn ids |
262 |
|
return patterns |
262 |
|
do not return patterns of indirects |
265 |
|
wait for pattern in background |
441 |
same flags as for | ||
|
wait for pattern after others |
255 |
same flags as for | ||
|
wait for pattern from terminal |
205 |
same flags as for | ||
|
wait for pattern from user |
188 |
same flags as for | ||
|
create child process |
370 |
|
return from caller |
226 |
|
pass control of process to user |
82 |
|
match eof |
337 |
|
match timeout |
338 |
|
match null |
338 |
|
arguments are braced |
320 |
|
regular expression |
324 |
|
exact string |
323 |
|
input processes |
349 |
|
output processes |
349 |
|
substitute for user process |
346 |
|
process patterns |
323 |
|
identify process |
345 |
|
echo |
329 |
|
do not buffer partial matches |
333 |
|
save indices of match |
324 |
|
reset terminal mode |
340 |
|
save process spawn id |
355 |
|
pattern action pairs |
320 |
|
pass control of Expect to user |
221 |
|
control output saving to file |
176 |
|
save all output |
177 |
|
save to beginning of file |
176 |
|
return state |
178 |
|
treat file as log |
176 |
|
treat file as log |
176 |
|
save output to file |
176 |
|
control output to screen |
171 |
|
return state |
178 |
|
stop or start output |
171 |
|
control match buffer size |
148 |
|
default (future processes) |
148 |
|
identify process |
245 |
|
new buffer size |
148 |
|
control parity |
154 |
|
default (future processes) |
154 |
|
identify process |
245 |
|
strip or preserve parity |
154 |
|
prompt after complete command |
224 |
|
prompt after incomplete command |
224 |
|
control nulls |
153 |
|
default (future processes) |
153 |
|
identify process |
245 |
|
preserve or strip nulls |
153 |
|
send string |
71 |
|
treat next string as literal |
278 |
|
identify process |
243 |
|
send humanly |
273 |
|
send slowly |
271 |
|
send null |
277 |
|
do not insert returns |
194 |
|
send break |
277 |
|
string to be sent |
71 |
|
send to standard error |
183 |
same flags as | ||
|
send to log |
178 |
|
treat next string as literal |
278 |
|
string to be sent |
178 |
|
sent to |
206 |
same flags as | ||
|
send to standard output |
181 |
same flags as | ||
|
sleep number of seconds |
192 |
|
start a process |
78 |
|
treat process as console |
296 |
|
ignore signal |
306 |
|
treat file as spawned process |
285 |
|
treat file as spawned process |
285 |
|
do not echo spawn command |
294 |
|
do not initialize pty like |
296 |
|
do not do sane initialization |
296 |
|
allocate pty without starting process |
289 |
|
trace statements |
401 |
|
return state |
401 |
|
depth to which to trace |
401 |
|
modify terminal parameters |
193 |
|
terminal to modify |
200 |
|
raw mode |
194 |
|
cooked mode |
195 |
|
cooked mode |
201 |
|
raw mode |
201 |
|
echo |
195 |
|
no echo |
195 |
|
set or return rows |
201 |
|
set or return columns |
201 |
|
execute native |
201 |
|
execute Bourne shell command |
203 |
|
return timestamp |
522 |
|
timestamp format |
522 |
|
time source |
522 |
|
define signal handler |
303 |
|
code to return |
316 |
|
interpreter to use |
316 |
|
return name of current signal |
305 |
|
return number of current signal |
305 |
|
return number of signals |
314 |
|
action to execute upon signals |
305 |
|
wait for process to go away |
105 |
|
identify process |
245 |
|
wait for process in future |
106 |
|
any listed spawned process |
254 |
|
number of initial arguments |
210 |
|
initial arguments |
210 |
|
name of script |
210 |
|
debugger breakpoint regexp results |
418 |
|
spawn id of standard error |
241 |
|
platform-independent utility scripts |
520 |
|
platform-dependent utility scripts |
520 |
|
results of |
111 |
|
results of |
324 |
|
controls for |
273 |
|
controls for |
271 |
|
results of |
290 |
|
currently spawned process |
229 |
|
|
296 |
|
maximum time for |
75 |
|
spawn id of |
241 |
|
spawn id of standard input and output |
241 |
3.144.84.155