嗨,我在tcl脚本中期待新手
我想ssh到特定的路由器并使用tcl发送一些命令,如date 我在windows中开发了tcl脚本:
#!/bin/sh
# \
exec C:/Tcl/bin/tclsh86/ "$0" ${1+"$@"}
package require Expect
spawn ssh "user\@x.x.x.x"
expect "*word:"
send "password\r";
expect "*>"
send "date\r";
当我执行脚本时,我收到以下错误:
Child process exited abnormally.
有人可以建议我做错了什么以及如何使其正确无误?