HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Message is not getting into if loop in AutoExpect script

 
sweetu
Occasional Contributor

Message is not getting into if loop in AutoExpect script

Trying to give the for loop in expect script. But while executing this it is not going into the loop or even getting terminated. Any suggestions will be appreciated.

Do want to enter Routing Information for the message?\[Y/N\]:"
send -- "$route\r"
expect -exact "$route\r
if {$route == Y}{
Specify the no of routing information tags to be added in the message:"
send -- "$routenbr\r"
expect -exact "$routenbr\r
Enter the routing information 1 \[Enter XML in a single line\] eq:from_phys_loc_typew:"
send -- "$routexml1\r"
expect -exact "$routexml1\r
send -- "\r"
expect -exact "\r
}
Enter the Thread Value for the message (1 or greater):"
send -- "1\r"
expect -exact "1\r
Enter the No. of times the message needs to be replicated:"
send -- "0\r"
expect -exact "0\r