user3636706
user3636706

Reputation: 207

How to execute another "expect script" inside an expect script

I have a problem that I want to execute an "expect script" inside of an expect script. Is there anyway to do this? I appreciate any help.

Upvotes: 0

Views: 1179

Answers (1)

phray2002
phray2002

Reputation: 473

[TL;DR]

one sample would help you understand

spawn expect ./runmysql.exp $dbEnv "select * from SalesOrder where orderNo='$orderId' \\G; \r"

Reference for more reading:

https://todzhang.com/blogs/tech/en/expect-script-is-your-secret-to-productivity

Related source:

https://github.com/CloudsDocker/MagnificentExpectScripts/blob/main/call_another_expect_script_from%20_one_expect_script.exp

Upvotes: 0

Related Questions