Quantcast
Channel: MikroTik
Viewing all articles
Browse latest Browse all 23620

Scripting • ssh command

$
0
0
I am interacting with RouterOS via ssh with the following command: /ip hotspot user print detail
and I get the following result:
Code:
Flags: * - default, X - disabled, D - dynamic 0 * ;;; counters and limits for trial users     name="default-trial" uptime=0s bytes-in=0 bytes-out=0 packets-in=0     packets-out=0 1   ;;; sample comment     name="user1" profile=default uptime=0s bytes-in=0 bytes-out=0     packets-in=0 packets-out=0 2 X name="user2" profile=default uptime=0s bytes-in=0 bytes-out=0 packets-in=0     packets-out=0
What I want to know is if there is a way for that result to be an array or a json object or at least the comment field does not appear as ;;; and that it comes out like the other fields, comment="sample comment"
Any suggestion is welcome

Statistics: Posted by tara — Wed Mar 05, 2025 3:02 am



Viewing all articles
Browse latest Browse all 23620

Trending Articles