EMM was introduced into Cisco IOS since 12.4(20)T and only applies to 2800/3800 or more platforms. It enables you to create a xml-based that provide a simple user interface.
Code:
<Menu MenuName="My First Menu" schemaVersion="1.1">
<MenuTitle>
</MenuTitle>
<Item ContinuePrompt="true">
<ItemTitle>
<Constant String="This is the first item"/>
</ItemTitle>
<IOSExecCommand>"show clock"</IOSExecCommand>
</Item>
<Item ContinuePrompt="true">
<ItemTitle>
<Constant String="Count Hostname Length"/>
</ItemTitle>
<EmbeddedTCL>
<TCLCommand>return [string length [hostname]]</TCLCommand>
</EmbeddedTCL>
</Item>
<Item>
<ItemTitle>
<Constant String="Exit"/>
</ItemTitle>
</Item>
</Menu>
save the code as a file "my.mdf"
run the script using command:
emm mdf flash:my.mdf
1. This is the first item
2. Count Hostname Length
3. Exit
choose 1:
*11:43:06.924 CN Mon Jul 28 2014
Press any key to continue...
choose 2
7
Press any key to continue...
choose 3 to exit
No comments:
Post a Comment