Net-Appliance-Session - Re: How to send a carriage return?

Posted on Mon Jan 28 22:45:54 2008 by oliver in response to 6957 (See the whole thread of 5)
Re: How to send a carriage return?
Hi,

No I can't see exactly if there is anything wrong, although I don't know which command you are trying to run. From your previous post and latest post, my best guess would be for you to do something like this:

$s->cmd( String => 'issu runversion 2 slavebootflash:cat4500e-entservicesk9-mz.122_44_SG_249.alpha', Match => ['/Proceed/'], ); $s->cmd( String => "\n", Match => ['//'], );

I think you need two stages because the reload might never return a prompt, so the // lets the module accept that. In my experience it's also easier to match on just a part of the response e.g. "Proceed" rather than the whole line, because it's more reliable. Your mileage may vary, I guess.

Let me know how you get on,

regards,
oliver.
Direct Responses: 6961 | Write a response