basic ssh script for show commands

Unanswered Question
May 22nd, 2008
User Badges:

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.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
glen.grant Thu, 05/22/2008 - 17:22
User Badges:
  • Purple, 4500 points or more

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

erdos_jonathan Thu, 05/22/2008 - 18:22
User Badges:

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?


This Discussion