good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Regular expressions in shell promptsby Corion (Patriarch) |
on Feb 12, 2018 at 14:11 UTC ( [id://1208997]=note: print w/replies, xml ) | Need Help?? |
Yes. Net::Telnet supports regular expressions for detecting the prompt. The example in the SYNOPSIS section already shows how to use a regular expression. The first step I would do is issue a mandate to change all (login) prompts on all routers to a single, identical scheme so that your script becomes simpler to maintain. That way any prompt that does not fit your scheme becomes the problem of the person buying/installing it and not yours.
In Section
Seekers of Perl Wisdom
|
|