December 1994
Intermediate to advanced
606 pages
16h 7m
English
The -notransfer flag prevents expect from removing matching characters from the internal buffer. The characters can be matched repeatedly as long as the -notransfer flag is associated with the pattern.
expect -notransfer pat
The -notransfer flag is particularly useful for experimenting with patterns. You can drive a program up to a point where it loads up the internal buffer and then try various patterns against it again and again. For convenience, the -notransfer flag can be abbreviated "-n" when Expect is running interactively.
In the next chapter, I will show some additional debugging aids that can be usefully combined with the -notransfer flag.
Read now
Unlock full access