Hum... still doesn't work.. shoot.<br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 12:54 PM, Dave Hostetler <span dir="ltr"><<a href="mailto:hostetler.david@gmail.com">hostetler.david@gmail.com</a>></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>'Do.*\(Y\/N\)\?' **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's still hanging on that line. I'll keep plugging away. I'm sure it'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"><<a href="mailto:trevormg19@gmail.com" target="_blank">trevormg19@gmail.com</a>></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>
'Do.*\(Y/N\)\?'<br>
<br>
Trevor<br>
<div><div></div><div><br>
On Thu, Jan 21, 2010 at 12:14 PM, Greg Brown <<a href="mailto:gwbrown1@gmail.com" target="_blank">gwbrown1@gmail.com</a>> wrote:<br>
> Ok, this is annoying.. my script works perfectly until the last line.. here<br>
> are the last couple of lines:<br>
><br>
> Primary DNS Server: 192.168.124.221<br>
> Optional DNS Server: 192.168.134.29<br>
> Is the above information correct (Y/N)?Y<br>
> You must reboot the sensor to take the setting effects<br>
> Do you want to reboot now(Y/N)?<br>
><br>
> An oc -d of the last three lines looks like this:<br>
><br>
> 0000000 I s t h e a b o v e i n f<br>
> 0000020 o r m a t i o n c o r r e c t<br>
> 0000040 ( Y / N ) ? Y \n Y o u m u s<br>
> 0000060 t r e b o o t t h e s e n<br>
> 0000100 s o r t o t a k e t h e<br>
> 0000120 s e t t i n g e f f e c t s \n<br>
> 0000140 D o y o u w a n t t o r<br>
> 0000160 e b o o t n o w ( Y / N ) ? \n<br>
> 0000200 \n<br>
> 0000201<br>
><br>
><br>
> I have tried *EVERYTHING* to match that last line including:<br>
><br>
> # now it tells us we must reboot (which we just told it we wanted to<br>
> do).. so send another Y<br>
> my($which, $why, $match, $before, $after) =<br>
> $ssh->expect(30,'-re','You.*');<br>
><br>
> # now it tells us we must reboot (which we just told it we wanted to<br>
> do).. so send another Y<br>
> my($which, $why, $match, $before, $after) = $ssh->expect(30,'*');<br>
><br>
> # now it tells us we must reboot (which we just told it we wanted to<br>
> do).. so send another Y<br>
> my($which, $why, $match, $before, $after) =<br>
> $ssh->expect(30,'-re','You.*(Y/N)?');<br>
><br>
> I've even tossed out the "You" and started with "Do"... and I've tried to<br>
> take the "magic match any darn thing" too.<br>
><br>
> And a thousand other combinations and nothing works. Does anyone have any<br>
> ideas? this is really giving me a headache.. The line above ends much the<br>
> same, but not exactly, but I've matched that and using the line below and it<br>
> works fine... ugh. Any ideas would be very welcomed at this point...<br>
><br>
> # now it wants to know if you want to reboot (and we do)<br>
> my($which, $why, $match, $before, $after) =<br>
> $ssh->expect(30,'-re','The.*(Y/N)?');<br>
><br>
> Greg<br>
><br>
><br>
><br>
><br>
><br>
</div></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>
><br>
><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>