cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1784
Views
0
Helpful
1
Replies

EEM script - append custom text to file in flash

Brett Verney
Level 1
Level 1

Hi there,

 

Is there a way to append custom text to a file in flash using an EEM script?

 

For example, if I had a script that did the following:

 

action 001 cli command "show version" | append flash:output.txt

action 002 cli command "show logging" | append flash:output.txt

 

Could I insert a headers such as:

 

---------- SHOW VERSION ----------

---------- SHOW LOGGING ----------

 

in to the 'output.txt' between each of the command results?

 

I'd expect it to look something like this:

 

action 001 <some_command> ---------- SHOW VERSION ---------- | append flash:output.txt

action 002 cli command "show version" | append flash:output.txt

action 003 <some_command> ---------- SHOW LOGGING ---------- | append flash:output.txt

action 004 cli command "show logging" | append flash:output.txt

 

Regards,

Brett

 

1 Reply 1

balaji.bandi
Hall of Fame
Hall of Fame

You can try

 

action 001 puts  "---------- SHOW VERSION ----------" | append flash:output.txt

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help