You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "EEM CLI patterns are not context sensitive"
date: "2007-12-17T07:34:00.000+01:00"
tags: [ EEM ]
---
When writing <acronym title="Embedded Event Manager">EEM</acronym> applets or policies that act on CLI commands, keep in mind that the pattern matching is not context sensitive. For example, if you want to <a href="https://blog.ipspace.net/2007/03/can-you-disable-reload-command.html">disable the reload command</a> and use the EEM applet …<pre class="code">event manager applet NoReload<br/> event cli pattern "reload" sync no skip yes</pre>… you cannot enter the <strong>action <em>x.y</em> reload</strong> configuration command any more (or any other command that includes the string <em>reload</em>).<br/><br/>To distinguish the reload command from other appearances of the same string, use the <em>^reload</em> pattern (reload occuring at the beginning of the line).<p class="note"><span>Trivia: </span>this actually occured to me when I was testing the setup described in the December IP Corner article. Sometimes we have to learn the hard way :)</p>