Is some way how to write to a file from script in RouterOS 2.9? Or how to redirect standard output of some command (e.g. /ping) to a file? Thanks.
Great question. How do you redirect command and function output to a file?
I would like to direct the results of this:
/interface wireless scan 0 duration=20
Flags: A - active, B - bss, P - privacy, R - routeros-network, N - nstreme
ADDRESS SSID BAND FREQ SIG NF SNR RADIO-NAME
ABP 00:23:69:76:1C:F1 linksys_wps_3732 5ghz 5200 -89 -94 5
AB RN 00:15:6D:64:3E:D3 5ghz 5210 -51 -94 43 SFSSE BH
AB RN 00:15:6D:64:67:2F 5ghz 5740 -56 -94 38 SE.S
AB RN 00:15:6D:65:21:59 5ghz 5740 -76 -94 18 SF2EE
AB RN 00:15:6D:64:FA:60 5ghz 5805 -86 -94 8 SF2CHV
AB RN 00:02:6F:5D:15:1D SNS 5ghz 5240 -75 -94 19 Transco W. Secto
B R 00:15:6D:5C:64:F4 ROC 5ghz 5185 -85 -94 9 ROC-Station
…into a file.
redirection is only possible where attribute file is available.
What about storing the value of the output to a variable that stays resident in the radio? That could be called from a script call from The Dude?
Help me out here people. Surely there is a way to do this.
you can store stuff in variable. Just note that when you want to load variable to file you have to tackle 4096 byte limit