AnAnAs
April 20, 2020, 11:49am
1
Hello,
I don’t understand why The Dude does not display the result of this command with as-value
With Winbox
[admin@SW1] > :put ([interface ethernet monitor sfpplus1 once as-value]->"sfp-vendor-part-number")
S+85DLC03D
With label The Dude
[ros_command(":put ([interface ethernet monitor sfpplus1 once as-value]->"sfp-vendor-part-number")")]
In the Dude
But now, if you delete as-value, it’s OK
[ros_command(":put ([interface ethernet monitor sfpplus1 once])")]
In the Dude
Do you know why ?
I also tested with the very latest version.
AnAnAs
April 22, 2020, 1:36pm
2
Hi All,
Perhaps,
to be more clear I only want to display a value in the monitor function.
Thx for your Feedback
I’d say it’s about your double quotes - the “inner” double quotes need to be escaped.
try this:
[ros_command(":put ([interface ethernet monitor sfpplus1 once as-value]->\"sfp-vendor-part-number\")")]
AnAnAs
April 23, 2020, 9:48am
4
Perfect,
Thx for your help
linas
March 24, 2021, 1:08pm
5
Hi
Is any chance to use global variable, witch is in mikrotik (not dudes) memory in ros_comman?
ros_command("/tool fetch url=sftp://x.x.x.x/DudeNew/files/backups/$variable user=user password=pass upload=yes src-path=export.rsc ")
Ok, found problem: ros_command("/tool fetch url="sftp://x.x.x.x/DudeNew/files/backups/$variable" user=user password=pass upload=yes src-path=export.rsc ")