December 1994
Intermediate to advanced
606 pages
16h 7m
English
The -b flag forces the script file to be read one line at a time (i.e., unbuffered). This is not normally necessary, but could be useful if the script file has not been completely written by the time Expect begins executing it. In general, however, it is simpler just to feed commands to the standard input of Expect (see next section). This avoids the necessity of a temporary script file.
By default (i.e., without the -b flag), the entire script is read into memory before being executed. A benefit of this is that you can edit scripts while executing them, and you do not have to worry about Expect (or a user) getting confused by the script changing out from under them.