1
我发送awk命令通过期望发送,当我发送我得到错误,但我不能读取1没有这样的变量使用AWK期望发送获取无法读取“1”:没有这样的变量错误
我没有使用{{}} mechansim但我没有工作,
expect "$prompt" {
send "awk {{print $1}} /mytest/test.log\r"
}
我试着用eascapse序列\,但我因此未找到任何响应expect_out(缓冲),..等等
expect "$prompt" {
send "awk '{print \$1}' /mytest/test.log\r"
}
我用exec命令也尝试过
expect "$prompt" {
send "exec awk {{print $1}} /mytest/test.log\r"
}