期望从输出行写入带有浪费“换行符”的变量文本
如何解决这个问题呢?
#!/usr/local/bin/expect -f
set timeout 30
puts "enter the path to output folder"
while 1 {
expect {
"*\n" {
set outdir $expect_out(buffer)
break
} timeout {
puts "warning: timed out"
set outdir $DEFAULT_OUT
break
}
}
}