Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

basic ssh script for show commands

Hello- I am looking to create a basic script to run through ssh and output some show commands. I have created so far a basic .bat file which points to a .txt file that includes the show commands. However, when I execute the .bat it points to the .txt file and runs fine when I only have one show command line in the .txt file. When I add a second line to the .txt file ie: show module

show version

I receive a 'Cmd Parse error' in the output log.

Any ideas? I am looking to avoid uploading a .txt file to bootflash:, as well as avoiding using the cmd 'run script'. I'd like to keep the cmd's external to the switch.



Re: basic ssh script for show commands

Are you hitting an enter key after each command , otherwise it may think you are doing one continuous command.

New Member

Re: basic ssh script for show commands

The .txt file with the commands has no special syntax within the commands.


show module

show version

It will output with only the first line - show module, but any other command lines, it gives a 'cmd parse error'.

Is there a specific syntax that the switch needs to read to move down to the next line?

CreatePlease to create content