Sometimes you'd like to automate execution of command sequences or create a command alias that would trigger a series of commands. One way of achieving this is by creating an EEM applet. For example, to clear IP routing table and reset BGP neighbors, define the following EEM applet:
event manager applet ClearAllYou can trigger this applet with the event manager run ClearAll command or you could configure a command alias, for example alias exec cleanup event manager run ClearAll.
action 1.0 cli command "clear ip route *"
action 2.0 cli command "clear ip bgp *"
Note: this article is part of You've asked for it series.