Answer the question
In order to leave comments, you need to log in
How to save the output (tcl > send) to a variable?
/usr/bin/expect -c ‘
spawn ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]
expect password
send «12345\r»
expect «.*»
set myvvv [send "$env(o1)\r"] —— таким образом сохранить вывод send в переменную myvvv не выходит. Как можно это сделать?
puts $myvvv
expect «.*»
send «exit\r»
interact’
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question