Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k

Problems with EEM applet using cli command "dir flash:"

I'm trying to use an EEM applet to perform a "dir flash:" and then look to see if a specific file name resides in it with a regexp for for the file name but I can't seem to get th dir flash: to work.

event none

action 1.0 cli command "dir flash:"

action 2.0 puts "$_cli_result"

Then I manually run it using

event manager run appletname

I get a return of "Invalid input detected at '^' marker." where the ^ is pointing to the 2nd e in the word event.  This output is usually what happens when improper syntax is used but I don't believe I've made a mistake and in the past when an applet didn't run properly, it gave no indication to the monitor/console.  It just died.

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Problems with EEM applet using cli command "dir flash:"

You need to be enabled to look at file system details.  Try:

event none

action 1.0 cli command "enable"

action 2.0 cli command "dir flash:"

action 3.0 puts "$_cli_result"

1 REPLY
Cisco Employee

Re: Problems with EEM applet using cli command "dir flash:"

You need to be enabled to look at file system details.  Try:

event none

action 1.0 cli command "enable"

action 2.0 cli command "dir flash:"

action 3.0 puts "$_cli_result"

182
Views
0
Helpful
1
Replies
CreatePlease to create content