Write command output to a file

Hello

Can i write to a file the output of a command ?
I want to save the output of a “interface wireless scan wlan1-gateway”
Is this possible while I am connected to the RB via wireless interface ?

Thanks.

Scanning to file is possible with wireless-rep or v6.37rc

Thank you..

Where can I find information about wireless-rep ?

RouterOS 6.37 is needed, “rep” no longer exists.

Here is how to use it:

[admin@sviests] > interface wireless 
[admin@sviests] /interface wireless> scan wlan1 background=yes save-file=results.txt duration=4s
Flags: A - active, P - privacy, R - routeros-network, N - nstreme, T - tdma, 
W - wds, B - bridge 
       ADDRESS           SSID        CHANNEL   SIG   NF SNR RADIO-... ROUTER...

[admin@sviests] /interface wireless> /file print 
 # NAME                                                                     TYPE                                                                          SIZE CREATION-TIME       
 0 flash                                                                    disk                                                                               jan/01/1970 03:00:00
 1 results.txt