I'm creating a custom login script for a Crescendo load balancer device.  I can log in to the device and get to interactive mode ok using the script, but when I try to run commands with something like:
<div><br></div><div>crescendologin -d -t 30 -c&quot;show running&quot; host</div><div><br></div><div>it appears that expect is trying to match on every character with output like:</div><div><br></div><div>...</div><div><div>
<div>send: sending &quot;show running\r&quot; to { exp6 }</div></div><div><br></div><div>expect: does &quot;&quot; (spawn_id exp6) match regular expression &quot;^[^\n\r]*root&gt; &quot;? no</div><div>&quot;^[^\n\r ]*&gt;&gt;.*root&gt; &quot;? no</div>
<div>&quot;[\n\r]+&quot;? no</div><div><br></div><div>expect: does &quot;s&quot; (spawn_id exp6) match regular expression &quot;^[^\n\r]*root&gt; &quot;? no</div><div>&quot;^[^\n\r ]*&gt;&gt;.*root&gt; &quot;? no</div><div>
&quot;[\n\r]+&quot;? no</div><div>expect: timed out</div><div><br></div><div>Error: TIMEOUT reached</div></div><div><br></div><div>I feel like I&#39;m missing something obvious.  The pertinent section of run_commands looks like:</div>
<div><br></div><div><div>    for {set i 0} {$i &lt; $num_commands} { incr i} {</div><div>        send -- &quot;[subst -nocommands [lindex $commands $i]]\r&quot;</div><div>        expect {</div><div>                -re &quot;^\[^\n\r]*$reprompt&quot;      { exp_continue }</div>
<div>                -re &quot;^\[^\n\r *]*$reprompt&quot;     {}</div><div>                -re &quot;\[\n\r]&quot;                   { exp_continue }</div><div>        }</div><div>    }</div></div><div><br></div><div>And the actual prompt is &quot;root&gt; &quot;</div>
<div><br></div><div>Thanks for any help.</div><div><br></div><div>BT</div><div><br></div>