How exp_continue Affects spawn_id
Earlier I noted that the expect
command decides which process to communicate with based on the value of spawn_id
. The expect
command checks the value of spawn_id
at two times: when it starts and after every exp_continue
command. This means that with an appropriate action in an expect
command, you can change the currently spawned process while the expect
command is running.
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.