Reply
Highlighted
Accepted Solution

CCS Export command in txt file

Lenco
Techie
Posts: 1
1087     0

Hi,

 

First, I apologize for my English Smiley Happy

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  

Re: CCS Export command in txt file

Authority
Posts: 31
1088     0

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

MiguelNebel
Techie
Posts: 1
1088     0

There are many ways to export content in memory as a *.dat or binary document to your PC.  Just apply the "Spare Memory" option in the Memory see and pick the best format to spare to data, binary, whatever you choose.

 

 

________________________________

dissertation proposal writing service

Re: CCS Export command in txt file

Authority
Posts: 31
1088     0

Miguel,

 

Did you respond to the wrong thread, perhaps?

 

Steve

Showing results for 
Search instead for 
Do you mean 

Recommended for You