josh803316 has asked for the wisdom of the Perl Monks concerning the following question:
but for some reason when I use the followingdevice#upgrade all ftp://anonymous@release.network.com/tagged/soc/OS.S +6K.V7_1T40 Fetching ftp://anonymous@release.network.com/tagged/soc/OS.S6K.V7_1T4F +ile size is 37548064 bytes ###################################################################### +################################################# ##############[OK] Download complete, file length is 37548064 bytes Forcing image installation... 'V7_1T40' will be next image to boot Upgrade complete: Use the 'reload' command to have upgrade take effect device#
I'm not capturing everything in the @output, Just the first two lines.@output = $net_tel_cisco->cmd( String => "$params->{cmd}\n", Cmd_remove_mode => 1, Timeout => $params->{timeout}, Prompt => '/(?m:.*[\w.-]+\s?(?:\(config[^\)]*\))?\s?[\ +$#>]\s?(?:\(enable\))?\s*$)/' );
So I guess, the question is......how can I fix the regex so that it doesn't see that line with multiple #### as a prompt. Maybe only expect a single # as an indication of a prompt?File size is 37548064 bytes #
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Telnet::Cisco and prompt regex issue
by josh803316 (Beadle) on Dec 09, 2010 at 05:44 UTC | |
by Anonymous Monk on Dec 09, 2010 at 08:43 UTC | |
by Anonyrnous Monk (Hermit) on Dec 09, 2010 at 09:08 UTC | |
by josh803316 (Beadle) on Dec 09, 2010 at 21:10 UTC | |
by josh803316 (Beadle) on Dec 09, 2010 at 05:49 UTC |