Filter a command output

From MikroTik Wiki
Revision as of 16:31, 8 June 2006 by Eugene (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The following command if pasted into the terminal will print all ppp active users having names starting from "ex":

: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; 

Eugene