Sort a list of object identifiers: Difference between revisions
Content added Content deleted
(Sort by OID numbers.) |
No edit summary |
||
Line 35: | Line 35: | ||
OUTPUT - Correctly Sorted |
OUTPUT - Correctly Sorted |
||
# |
# 01 | .1.3.6.1.4.1.11.2.17.19.2.0.9 | |
||
# |
# 02 | .1.3.6.1.4.1.11.2.17.19.2.0.79 | |
||
# |
# 03 | .1.3.6.1.4.1.11.2.17.19.3.4.0.1 | |
||
# |
# 04 | .1.3.6.1.4.1.11.2.17.19.3.4.0.2 | |
||
# |
# 05 | .1.3.6.1.4.1.11.2.17.19.3.4.0.3 | |
||
# |
# 06 | .1.3.6.1.4.1.11.2.17.19.3.4.0.4 | |
||
# |
# 07 | .1.3.6.1.4.1.11.2.17.19.3.4.0.10 | |
||
# |
# 08 | .1.3.6.1.4.1.11.2.17.19.3.4.0.19 | |
||
# |
# 09 | .1.3.6.1.4.1.11.2.17.19.3.4.0.22 | |
||
# 10 | .1.3.6.1.4.1.11.2.17.19.3.4.0.25 | |
# 10 | .1.3.6.1.4.1.11.2.17.19.3.4.0.25 | |
||
# 11 | .1.3.6.1.4.1.11.2.17.19.3.4.0.31 | |
# 11 | .1.3.6.1.4.1.11.2.17.19.3.4.0.31 | |
Revision as of 20:23, 7 July 2016
Sort by OID numbers.
OID - Object Identifiers are used in Network data These numbers can vary in length, and have a dot "." between them. The individual number can be of different number of digits also.
Example:
==========================
INPUT
@arrayOID = (
".1.3.6.1.4.1.11.2.17.19.3.4.0.10", ".1.3.6.1.4.1.11150.3.4.0.2", ".1.3.6.1.4.1.11.2.17.19.3.4.0.19", ".1.3.6.1.4.1.11150.3.4.0.1", ".1.3.6.1.4.1.11.2.17.19.3.4.0.22", ".1.3.6.1.4.1.11.2.17.19.3.4.0.2", ".1.3.6.1.4.1.11150.3.4.0.11", ".1.3.6.1.4.1.11.2.17.19.3.4.0.1", ".1.3.6.1.4.1.11.2.17.3773.0.2", ".1.3.6.1.4.1.11.2.17.19.2.0.79", ".1.3.6.1.4.1.11150.3.4.0.21", ".1.3.6.1.4.1.11.2.17.19.2.0.9", ".1.3.6.1.4.1.11.2.17.19.3.4.0.25", ".1.3.6.1.4.1.11.2.17.19.3.4.0.32", ".1.3.6.1.4.1.11.2.17.19.3.4.0.4", ".1.3.6.1.4.1.11.2.17.19.3.4.0.31", ".1.3.6.1.4.1.11.2.17.19.3.4.0.3", ".1.3.6.1.4.1.11.2.17.3773.0.1"
);
============================
OUTPUT - Correctly Sorted
- 01 | .1.3.6.1.4.1.11.2.17.19.2.0.9 |
- 02 | .1.3.6.1.4.1.11.2.17.19.2.0.79 |
- 03 | .1.3.6.1.4.1.11.2.17.19.3.4.0.1 |
- 04 | .1.3.6.1.4.1.11.2.17.19.3.4.0.2 |
- 05 | .1.3.6.1.4.1.11.2.17.19.3.4.0.3 |
- 06 | .1.3.6.1.4.1.11.2.17.19.3.4.0.4 |
- 07 | .1.3.6.1.4.1.11.2.17.19.3.4.0.10 |
- 08 | .1.3.6.1.4.1.11.2.17.19.3.4.0.19 |
- 09 | .1.3.6.1.4.1.11.2.17.19.3.4.0.22 |
- 10 | .1.3.6.1.4.1.11.2.17.19.3.4.0.25 |
- 11 | .1.3.6.1.4.1.11.2.17.19.3.4.0.31 |
- 12 | .1.3.6.1.4.1.11.2.17.19.3.4.0.32 |
- 13 | .1.3.6.1.4.1.11.2.17.3773.0.1 |
- 14 | .1.3.6.1.4.1.11.2.17.3773.0.2 |
- 15 | .1.3.6.1.4.1.11150.3.4.0.1 |
- 16 | .1.3.6.1.4.1.11150.3.4.0.2 |
- 17 | .1.3.6.1.4.1.11150.3.4.0.11 |
- 18 | .1.3.6.1.4.1.11150.3.4.0.21 |