cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
319
Views
0
Helpful
1
Replies

nrcmd, Windows and scripting

sonnys
Level 1
Level 1

Hello all,

I'm trying to do what I'll call "conditionnal interaction" with nrcmd program installed on Windows from a script (ideally coded with Python but almost anything else would be good too.).

The nearer a get from that goal is "interaction" (but not conditionnal). Which means that I can start the program (nrcmd) and send commands but I can read the nrcmd output only after all my commands are sent (I cannot read it immediatly after a command and then send another one based on the reply).

To make it simple and clearer. Say the server's job is to give apples and I want to chose those having the biggest qty:

shell> start appelServer

s> Yes?

c> I want apples.

s> I've got 10 green and 15 red. Do you want green or red?

c> Red.

s> Here there are. Bye.

Up to now, I did not manage to answer "red" or "green" based on the server reply. I have to send all my commands before getting a result. In my example I could only send:

c> I want apple

c> Red

Then get all the server replies... and finaly realize there were more green apples than red!

If nrcmd would be installed on Linux I could do this relatively easily using Python or Perl's modules. But it seems that Windows is not that "system-command / pipes" friendly.

So my questions are:

- Is there any way I could conditionnaly interact with nrcmd installed on Windows from a program?

- How?

- Is Cisco making available any API or extensions to interact conditionnaly with nrcmd on Windows?

Thanks for your time.

1 Reply 1

sonnys
Level 1
Level 1

Follow-up:

I finally opted for Pragma Telnet Server that gives me the possibility to programmaticaly do that job: I call Telnet server then nrcmd. Windows Telnet Server does not seem to give me the possibility to do that.

Review Cisco Networking for a $25 gift card