Aidan Gauland <aidal...@no8wireless.co.nz> writes: > Then I have a sexp for debugging, which shows that `expect' is getting > one character at a time from the telnet subprocess, since it only > prints out "Tmatch", instead of "Trying [IP address]..."
Well, as the manual says: -- Macro: expect clause ... [...] The procedures are called in turn after each character is read from the port, [...] The test is successful if the procedure returns a non-false value. Your lambda returns *unspecified*, which counts as a non-false value. So the whole (expect ...) invocation completes after reading just one character. Neil