cancel
Showing results for 
Search instead for 
Did you mean: 

How can I remove the number after switch name?

How can I remove the number after switch name?

Ali_Askari
New Contributor II
I have connected to the switch using a telnet session. The prompt that I have looks something like this:

switchName.1 #

After issuing a command the number right after the switch name increments. So the prompt is:

switchName.2 #

For different reasons I don't want to see that number. Is there a way I could remove that number?

10 REPLIES 10

Dorian_Perry
Extreme Employee
Hi Ali,

I want to point out that if you need to remove the number for scripting purposes, a regular expression could be used to detect the prompt and avoid conflicts due to the changing number.

I believe this will do it:

std::regex re("switchName.[0-9]+\s#");

Hi Dorian,

That's why I need to remove it. I am not familiar with regular expression. How can I do it in C++?

Rodrigo_Azevedo
New Contributor II
It's not necessary remove this number..
GTM-P2G8KFN