Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by bryan3k

  1. bryan3k

    Expect matches actual command instead of output

    That's the thing, sometimes there was no output but the expect command would match because the word "down" was in the command. I did find what I needed though by using the parenthesis to match newline and put things in the expect_out array. For example (this is just off the top of my head for...
  2. bryan3k

    Expect matches actual command instead of output

    I have an issue where expect is matching the actual remote command instead of the output. The code is: send "show card 1 | match down\r" expect { "down" {write_card_fail $host} } The problem is expect matches the "down" from the command and not the actual output of the command. Anyway to...
  3. bryan3k

    Expect/TCL - Handling a Telnet connection failure

    Ok, I think I came up with a solution. I went ahead with my original plan, but moved the backup and verify functions under the log_in function: proc log_in {host} { global spawn_id spawn telnet $host exp_internal 1 set timeout 30 expect { "Connect failed" { fail $host; return }...
  4. bryan3k

    Expect/TCL - Handling a Telnet connection failure

    Hello, I have an Expect script that logs into a number of routers to perform backups and it works pretty well. The problem I am having is figuring what to do when the host is not responding. Here is the snippet for the log in procedure: proc log_in {host} { global spawn_id spawn telnet...

Part and Inventory Search

Back
Top