cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
703
Views
3
Helpful
16
Replies

EEM scripting help

Sunny5
Level 1
Level 1

I'm trying to have EEM script where I run the script manually and it display the output of the results in the session but for some reason I'm unable to do so. This is what I have so far


(config)#event manager applet TestCommand
(config-applet)# event none 
(config-applet)# action 1.0 cli command "show version"
(config-applet)# action 2.0 puts "$_cli_result"
(config-applet)#end

 

When I do "event manager run TestCommand" it shows a blank output with no results. 

16 Replies 16

Sunny5
Level 1
Level 1

i found my solution for this, i had to put single quotations around $_cli_result to get this to work

event manager applet TestCommand
event none
action 1.0 cli command "enable"
action 2.0 cli command "show version"
action 3.0 puts '$_cli_result'

thanks a lot for update us 

have a nice day

MHM