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