简体   繁体   中英

how to use a command of a bash script in a expect script?

I have the following code, which is an expect script, I want to use mkdir to create a directory called input but I know that the command mkdir doesnt work in an expect script I would appreciate any help with this issue, I tried the folloging approach:

#!/usr/bin/expect
 expect "hello"
 send "world"
 mkdir input 

您不需要使用bash ,只需使用TCL的内置file mkdir命令:

file mkdir input

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM