03-07-2019 11:56 AM
Hoping someone can help me here as i been unable to figure this out.
I have a command "sh ip cache flow | in 0000" that I need to append to a file on flash.
However when i use action 1.6 cli command "sh ip cache flow | in 0000 | append disk0:/rxload.txt" it does not work because of the extra pipe. I was thinking of using $_cli_result but cant figure out how to append that to the file.
TIA, Paul
03-08-2019 11:58 AM
Hi there,
I have only tested this on GNS3 (where it is not working)...but try the following:
! event manager applet TEST event none action 1.0 cli command "sh ip int | inc packets" action 1.5 file open fh disk0:/test.txt w action 1.6 file write fh "$_cli_result" action 1.7 file close fh !
...reading the EEM4.0 docs, there is no mention of whether action file write appends to an existing file or not....hopefully it does.
cheers,
Seb.
03-22-2019 08:04 AM
that did not work, anyone know how to pass a | in a EEM script.
Paul
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: