Because dynamic interfaces can come and go, I have a need to make a snapshot of what interfaces exist at a given point in time, and then search through the snapshot rather than do a real-time search.
For example, instead of...
/interface find name~"ether"
...I want to first capture & store the existing interfaces to an array of an array...
:local $interfaces [/interface print detail as-value]
...and then search through that multidimensional array the same way I would through the active interfaces array (
e.g. by being able to reference particular array keys), like so:
:find $interfaces name~"ether"
The hope is that I would get back a list of IDs (perhaps representing positions within the array) of matches. But of course :find doesn't seemingly work like that.
I can of course search through the entire contents of the array for a regex match...
:put ($interfaces~"ether")
true
...but that's not exactly helpful, now is it?
Really hoping this is possible to do without iterating over each array member, which is very much Not Quick. Thanks for any leads.