RouterOS Italia

Versione completa: [Mikrotik] Filter a command output
Al momento stai visualizzando i contenuti in una versione ridotta. Visualizza la versione completa e formattata.
The following command if pasted into the terminal will print all ppp active users having names starting from "ex": 
Codice:
:global list ""; :foreach i in [/ppp active find] do={:if ([:find [/ppp active get $i name] "ex"]=0)
 do={:set list ($list . "," . $i);}}; /ppp active print detail without-paging from $list;
Output:
Codice:
[admin@10.0.11.11] >

Codice:
Flags: R - radius

Codice:
0   name="ex" service=l2tp caller-id="1.2.2.50" address=3.3.0.254

Codice:
    uptime=3w3h34m48s encoding="" session-id=0x81E00000 limit-bytes-in=0

Codice:
    limit-bytes-out=0


Codice:
1   name="ex2" service=l2tp caller-id="1.2.2.50" address=3.3.0.253

Codice:
    uptime=17m14s encoding="" session-id=0x81E00001 limit-bytes-in=0

Codice:
    limit-bytes-out=0


Codice:
[admin@10.0.11.11] >