basic ssh script for show commands
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2008 02:00 PM - edited 03-05-2019 11:10 PM
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.
Thanks!
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2008 05:22 PM
Are you hitting an enter key after each command , otherwise it may think you are doing one continuous command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2008 06:22 PM
The .txt file with the commands has no special syntax within the commands.
ie:
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?
