Posted to tcl by niekniek at Wed Feb 27 23:18:47 GMT 2019view raw

  1. #!/usr/bin/expect -f
  2. log_file -a ~/results.log
  3. spawn ssh user\@host
  4.  
  5. expect "E*" {
  6. send "blabla\r"
  7. }
  8.  
  9. expect "*#" {
  10. send "sh int status\n"
  11. }
  12.  
  13. sleep 10
  14.  
  15. send "sh int status\n"
  16.  
  17. exit