This is a conundrum since MikroTik decided to change the behavior of /export terse
I don’t mind the change in itself but the problem is how do I handle this with a single line? Using 2 lines will not work as it will include the output in the config backup
So at first I thought I could use this, which detects if its v6 or not and then run 1 command or the other appropriately
But it doesn’t work because it errors out due a syntax error, as ‘show-sensitive’ is not a valid parameter in V6 and its parsing what is in the else= field and determining it as invalid syntax and not running the code at all
Is there any way to handle this? I’m not sure if it there is a way to parse a string as command? Or any other way to handle this that is both V6 and V7 compatible?
v7 is still beta at best and definitely not a full replacement for v6
Besides, managing a dozen routers that you own is fine, managing hundreds/thousands of devices it’s just not practical to enforce an upgrade to v7 (that then breaks other things) that sort of idea is nonsensical
An example of all the things that are missing on v7, which are instead present on v6, which therefore do not make it possible to install v7, (ignoring BGP & Co.)…
Where is user-manager on v7?
Not something called “use-manager”, but something that have same functionality as user-manager on v6
(I’m not saying that v7 doesn’t work, but that it doesn’t have all the same features as v6, although other things have been added on v7 [useless or not])
Why? It's entirely valid in this example, there will ALWAYS be at least 1 package, and packages have the same version number (but may change in name, thus 0 is perfectly suited)
If it was something like a firewall rule then yeah no, fully agree. But in this example its just being pedantic
More than happy for you to show me a scenario where 'get 0' will not work as expected in this case
This turned out to be the correct answer, use the :execute command which does work with variables. So this is what i’m using in scripts
I’m using the following to get actual/major/minor revisions. This allows integer comparisons for specific changes such as 7.13+ wifi drivers
RouterOS = 7.13.3 (strips the " (Stable)")
RouterOSMajor = 7
RouterOSMinor = 13