Hi,
I am trying to do an automation of the diagnostics
using Expect.
Here is what I want the script to do:
1. Spawn a telnet command to a System
2. Expect a (std output) specific string like
{hardwareID*) and then issue a command "b"
3. Then see another string like (IOSC>) then issue
another command "reset"
My script is like this:
*****************************************
!/usr/bin/env expect -f
spawn telnet 192.192.194.27 2003
#expect timeout {send_user "Failed to boot\n"; exit} \
-re "OK"
expect -re "(.*)(hardwareID)(.*)"
send "b\r"
expect "IOSC>"
send "reset\r"
***********************************************
Is there anything wrong in this. if so kindly help me
out if something should be included to make it work.
Thanks,
samy
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user