in reply to Expect question
I was about to try the few lines proposed by Argel when I noticed that example was using single quotes '...'rather than doubles like I was using "..." Before trying those lines I just replaced my doubles with single quotes and changed nothing else. it worked just fine. I even killed the spaces trailing the colon after password and it still matched just fine.
The string I was trying to match was the "Password:" part of the entire return from the server, which looked like "Connecting to <ip>... \n\rPassword: ". I know using 'Password:' works but I have no idea why. (just went back and read some more about single and double quotes, but I'm still in the fog)
Since this is a slightly different problem, I just wanted to post here my findings and thank you for your replies. I'll ask the next question in a separate thread.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Expect question
by Argel (Prior) on Oct 29, 2007 at 19:54 UTC | |
by RaduH (Scribe) on Oct 31, 2007 at 14:01 UTC | |
by Argel (Prior) on Oct 31, 2007 at 17:01 UTC |