Version 3 of Expect and choice

Updated 2008-08-10 10:05:02 by lars_h

[Make time to explain recurring question about expecting alternatives.]

Model question: "need something like 'if expect is {y/n} send y; if not, send quit'". Skeleton answer:

    expect {
        y/n {
            send y\r
        }
        timeout {
            send quit\r
        }
    }