Created
December 4, 2012 10:52
-
-
Save betrcode/4202626 to your computer and use it in GitHub Desktop.
TCL Expect script to turn ON/OFF a switch on a iTach WF2CC, to be called from Jenkins in a post build action (usage: tclsh build-failed.tcl)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# \ | |
exec tclsh "$0" ${1+"$@"} | |
package require Expect | |
set exp::winnt_debug 1 | |
puts stdout "Connecting to iTach and turning it ON\n" | |
spawn plink -telnet 1.3.3.184 -P 4998 | |
expect "Escape character is '^]'." | |
send "setstate,1:2,1\r" | |
expect "setstate,1:2,1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# \ | |
exec tclsh "$0" ${1+"$@"} | |
package require Expect | |
set exp::winnt_debug 1 | |
puts stdout "Connecting to iTach and turning it OFF\n" | |
spawn plink -telnet 1.3.3.184 -P 4998 | |
expect "Escape character is '^]'." | |
send "setstate,1:2,0\r" | |
expect "setstate,1:2,0" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment