I am trying to write a perl module that uses the Net::Telnet code, but the problem is the prompt. I am writing the application for other user and not sure of what the prompt pattern they might have. Is there a way I can get the prompt at run time?
Share
As Telnet on remote side spawns a new shell-session, (you are right) it depends on user’s profile how the prompt will look like. It is common for shells to read the prompt format from
PS1variable. So you need to execute something like:to read how the prompt looks like.