Need Help in Loop Foreach
- From: "Henr" <mlenf@xxxxxxxxx>
- Date: Mon, 25 Sep 2006 14:11:06 -0500
Hi, I'm new to Expect/TCL can someone help me out with this simple script.
I'd like to insert a loop, in such a way that it reads all the "System ID"
from a file called "SysIDList"
# cat SysIDList
8
9
10
#!/usr/local/bin/expect
# Query all the systems status by inputting the SystemIDs on Expect Script
set env(HOME);
log_file $env(HOME)/getsys-out3;
spawn sys_monitor;
expect
"**********************************************************************";
expect "* SYSMonitor
*";
expect
"**********************************************************************";
expect " SYSMonitor-> ";
send "QUERY\r";
expect " ======================================";
expect " System ID :";
send "8\r"; # This is where the loop would be needed.
expect " SYSMonitor-> ";
send "exit\r";
log_file;
.
- Follow-Ups:
- Re: Need Help in Loop Foreach
- From: Bezoar
- Re: Need Help in Loop Foreach
- From: Cameron Laird
- Re: Need Help in Loop Foreach
- From: Kaitzschu
- Re: Need Help in Loop Foreach
- Prev by Date: Canvas items and -active<mumble> and -state ...
- Next by Date: Re: is tcl/tk dying out?!
- Previous by thread: Canvas items and -active<mumble> and -state ...
- Next by thread: Re: Need Help in Loop Foreach
- Index(es):
Relevant Pages
|