- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

CCS Export command in txt file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-07-2018 06:05 AM
Hi,
First, I apologize for my English
Here is my situation : I have a script that configure the speed of each interface of a Cisco Switch to auto mode, but instead I would like to have a file in which netmri will put the command(s) that must be executed.
Something like "echo" command in bash.
Is it possible to export command in an output file (.txt) ?
Here is an example :
In bash the script will do something like this :
echo "interface FastEthernet0/1" >> command.txt
echo "speed auto" >> command.txt
echo "exit" >> command.txt
echo "interface FastEthernet0/2" >> command.txt
echo "speed" >> command.txt
echo "exit" >> command.txt
Here is the content of command.txt file :
interface FastEthernet0/1
speed auto
exit
interface FastEthernet0/2
speed auto
exit
thx
Solved! Go to Solution.

Re: CCS Export command in txt file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-14-2018 12:39 PM
Hey, Lenco,
Just use the print command, as follows:
PRINT (filename): command
Quotes should not be needed.
So your code would look like this:
PRINT (filename): interface FastEthernet0/1
PRINT (filename): speed auto
PRINT (filename): exit
PRINT (filename): interface FastEthernet0/2
PRINT (filename): speed auto
PRINT (filename): exit
Once the job finishes, open the Job Details Viewer, and then the Files tab. The file will be listed for download.
Also, download the CCS Scripting Guide under Tech Docs. It is very handy.
Hope this helps.
Steve
Re: CCS Export command in txt file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-01-2018 06:35 AM
Miguel,
Did you respond to the wrong thread, perhaps?
Steve