Hum... still doesn&#39;t work.. shoot.<br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 12:54 PM, Dave Hostetler <span dir="ltr">&lt;<a href="mailto:hostetler.david@gmail.com">hostetler.david@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="word-wrap: break-word;">You may need to also escape the / so...<div>&#39;Do.*\(Y\/N\)\?&#39;  **NOTE that is not a V is it \ / together.<br>
<font color="#888888"><div>
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><br>
Dave</span>
</div></font><div><div></div><div class="h5">
<br><div><div>On Jan 21, 2010, at 12:51 PM, Greg Brown wrote:</div><br><blockquote type="cite">Hum... it&#39;s still hanging on that line.  I&#39;ll keep plugging away.  I&#39;m sure it&#39;s tripping up on something in there.  <div>
<br></div><div>Greg<br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 12:20 PM, Trevor Little <span dir="ltr">&lt;<a href="mailto:trevormg19@gmail.com" target="_blank">trevormg19@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Remember that parens and question marks are special in regular<br>
expressions, so you probably need something like this:<br>
<br>
&#39;Do.*\(Y/N\)\?&#39;<br>
<br>
Trevor<br>
<div><div></div><div><br>
On Thu, Jan 21, 2010 at 12:14 PM, Greg Brown &lt;<a href="mailto:gwbrown1@gmail.com" target="_blank">gwbrown1@gmail.com</a>&gt; wrote:<br>
&gt; Ok, this is annoying.. my script works perfectly until the last line.. here<br>
&gt; are the last couple of lines:<br>
&gt;<br>
&gt; Primary DNS Server:    192.168.124.221<br>
&gt; Optional DNS Server:    192.168.134.29<br>
&gt; Is the above information correct (Y/N)?Y<br>
&gt; You must reboot the sensor to take the setting effects<br>
&gt; Do you want to reboot now(Y/N)?<br>
&gt;<br>
&gt; An oc -d of the last three lines looks like this:<br>
&gt;<br>
&gt; 0000000   I   s       t   h   e       a   b   o   v   e       i   n   f<br>
&gt; 0000020   o   r   m   a   t   i   o   n       c   o   r   r   e   c   t<br>
&gt; 0000040       (   Y   /   N   )   ?   Y  \n   Y   o   u       m   u   s<br>
&gt; 0000060   t       r   e   b   o   o   t       t   h   e       s   e   n<br>
&gt; 0000100   s   o   r       t   o       t   a   k   e       t   h   e<br>
&gt; 0000120   s   e   t   t   i   n   g       e   f   f   e   c   t   s  \n<br>
&gt; 0000140   D   o       y   o   u       w   a   n   t       t   o       r<br>
&gt; 0000160   e   b   o   o   t       n   o   w   (   Y   /   N   )   ?  \n<br>
&gt; 0000200  \n<br>
&gt; 0000201<br>
&gt;<br>
&gt;<br>
&gt; I have tried *EVERYTHING* to match that last line including:<br>
&gt;<br>
&gt;         # now it tells us we must reboot (which we just told it we wanted to<br>
&gt; do).. so send another Y<br>
&gt;         my($which, $why, $match, $before, $after) =<br>
&gt; $ssh-&gt;expect(30,&#39;-re&#39;,&#39;You.*&#39;);<br>
&gt;<br>
&gt;         # now it tells us we must reboot (which we just told it we wanted to<br>
&gt; do).. so send another Y<br>
&gt;         my($which, $why, $match, $before, $after) = $ssh-&gt;expect(30,&#39;*&#39;);<br>
&gt;<br>
&gt;         # now it tells us we must reboot (which we just told it we wanted to<br>
&gt; do).. so send another Y<br>
&gt;         my($which, $why, $match, $before, $after) =<br>
&gt; $ssh-&gt;expect(30,&#39;-re&#39;,&#39;You.*(Y/N)?&#39;);<br>
&gt;<br>
&gt; I&#39;ve even tossed out the &quot;You&quot; and started with &quot;Do&quot;... and I&#39;ve tried to<br>
&gt; take the &quot;magic match any darn thing&quot; too.<br>
&gt;<br>
&gt; And a thousand other combinations and nothing works.  Does anyone have any<br>
&gt; ideas?  this is really giving me a headache..  The line above ends much the<br>
&gt; same, but not exactly, but I&#39;ve matched that and using the line below and it<br>
&gt; works fine... ugh.  Any ideas would be very welcomed at this point...<br>
&gt;<br>
&gt; # now it wants to know if you want to reboot (and we do)<br>
&gt; my($which, $why, $match, $before, $after) =<br>
&gt; $ssh-&gt;expect(30,&#39;-re&#39;,&#39;The.*(Y/N)?&#39;);<br>
&gt;<br>
&gt; Greg<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Trilug-ontopic mailing list<br>
&gt; <a href="mailto:Trilug-ontopic@trilug.org" target="_blank">Trilug-ontopic@trilug.org</a><br>
&gt; <a href="http://www.trilug.org/mailman/listinfo/trilug-ontopic" target="_blank">http://www.trilug.org/mailman/listinfo/trilug-ontopic</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
Trilug-ontopic mailing list<br>
<a href="mailto:Trilug-ontopic@trilug.org" target="_blank">Trilug-ontopic@trilug.org</a><br>
<a href="http://www.trilug.org/mailman/listinfo/trilug-ontopic" target="_blank">http://www.trilug.org/mailman/listinfo/trilug-ontopic</a><br>
</blockquote></div><br></div>
_______________________________________________<br>Trilug-ontopic mailing list<br><a href="mailto:Trilug-ontopic@trilug.org" target="_blank">Trilug-ontopic@trilug.org</a><br><a href="http://www.trilug.org/mailman/listinfo/trilug-ontopic" target="_blank">http://www.trilug.org/mailman/listinfo/trilug-ontopic</a><br>
</blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
Trilug-ontopic mailing list<br>
<a href="mailto:Trilug-ontopic@trilug.org">Trilug-ontopic@trilug.org</a><br>
<a href="http://www.trilug.org/mailman/listinfo/trilug-ontopic" target="_blank">http://www.trilug.org/mailman/listinfo/trilug-ontopic</a><br>
<br></blockquote></div><br>