Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
Showing results for 
Search instead for 
Did you mean: 

Having IF loop problem in expect script

Occasional Contributor

Having IF loop problem in expect script

I am trying to add if loop in the recorded script. But it is getting hanged. It is not going in to the loop or not even coming out. Any idea why i am having this loop problem.
Steven Schweda
Honored Contributor

Re: Having IF loop problem in expect script

> Any idea [...]


Have you thought about showing people what
you're doing? Or were you looking for help
from psychics who can read your mind and see
what you've tried, and what you want it to

> Having IF loop problem in expect script

Not your biggest problem.
Daniel Simard
Frequent Advisor

Re: Having IF loop problem in expect script

I agree with Steven, you need to post your script so we could have a look for you.

how big is it?

unless we can see your script, there no way we can help you.

personally, i break down my scripts in sections and "test" each section as it goes.

put comments as the script flows so that you know where it jamms,

for example, divide your script in 20 sections and put

echo "1"

echo "2"

echo "3"

and as it runs, you will know how far it goes before it dies, or remove your IF command if it won't even run!
Si tu n'as pas ce que tu aimes, aimes ce que tu as.