I have the code:
Code: Select all
/ip hotspot user print where profile="0300kbps" or profile="0600kbps" or profile="0750kbps" or profile="0900kbps" or profile="1200kbps"
/ip hotspot user print where profile="0300kbps" or profile="0600kbps" or profile="0750kbps" or profile="0900kbps" or profile="1200kbps"
:foreach ITEM in=[/ip hotspot user find profile="0300kbps" or profile="0600kbps" or profile="0750kbps" or profile="0900kbps" or profile="1200kbps"] do={
:local COMMENT [/ip hotpost user get $ITEM comment];
:put "$COMMENT";
}
there is error in the word hotspot in line 2You can't use print for that. Print prints lists of items, with all their properties. You have to find the items, extract the properties you want, and put them.
Code: Select all:foreach ITEM in=[/ip hotspot user find profile="0300kbps" or profile="0600kbps" or profile="0750kbps" or profile="0900kbps" or profile="1200kbps"] do={ :local COMMENT [/ip hotpost user get $ITEM comment]; :put "$COMMENT"; }