Defining ENUM-like data structure in the script itself. A simple tutorial script on how to sort via slax.
[edit]
jnpr@Boomer-RE0# run op array
10.10.10.3
10.10.10.2
10.10.10.1
---------------
version 1.0;
ns junos = "http:;
ns xnm = "http:;
ns jcs = "http:;
import "../import/junos.xsl";
match / {
<op-script-results> {
<output method= "text"> {
var $enum := {
<ipaddr>"10.10.10.1";
<ipaddr>"10.10.10.2";
<ipaddr>"10.10.10.3";
}
for-each ($enum/ipaddr) {
<xsl:sort select = "." order = "descending">;
expr . _ "\n";
}
}
}
}
No comments:
Post a Comment