did you want to ask something?
In fact, yes. I have no idea why my article showed up in the article preview but did end up posted empty. I apologize.
I must be missing some documentation about RouterOS command line basics, since the reference guide doesn’t seem to explain how to use the get and find commands.
Here an example of the issue I have with the get command:
[admin@microtik] /ip hotspot user> get tester
[admin@microtik] /ip hotspot user> get tester uptime
[admin@microtik] /ip hotspot user> print
Flags: X - disabled, D - dynamic
# SERVER NAME ADDRESS PROFILE UPTIME
0 tester 211WLANhot 58m9s
Why do I get empty output with the “get tester” command?
Same issue with find:
[admin@microtik] /ip hotspot user> find name=tester
[admin@microtik] /ip hotspot user> find name="tester"
[admin@microtik] /ip hotspot user>
What am I doing wrong?
Greetings
Marc, this time checking whether the article gets actually posted
get by default is not printing anything, it only returns value that you can assign to variable or print on screen.
:put command will put value on screen
:put [get tester uptime]
Ok, thanks. I think I have grokked this now.
Next issue:
[admin@microtik] /ip hotspot user> /system script print
Flags: I - invalid
0 name="kill-used-wlan-accounts" owner="admin" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff
last-started=jan/20/2009 15:12:00 run-count=31 source=
:foreach a in=[/ip hotspot user find uptime!=0 ] do={
:put $a
:put [/ip hotspot get $a name]
}
[admin@microtik] /ip hotspot user> /system script run 0
*1
211AuthHot
*cb
*cc
*cd
*ce
*cf
*d0
*13a
[admin@microtik] /ip hotspot user>
I guess that my $a doesn’t get assigned a value which can be used in the /ip hotspot user get command, but where does the “211WLANHot”, which is a value from the “profile” column of my user list, come from?
Greetings
Marc