Tweaking one of my scripts to include total wireless registration count and running count as it loops through the entire list for action. Running into an issue where referencing the interface name as a variable returns no results, while explicitly referencing it returns the proper results. Can't seem to figure out why.
Code: Select all
######The following DOES work:######
:local totalWirelessInt
#Set total wireless registrations
:set totalWirelessInt [/interface wireless registration-table print count-only where name=wlan1];
:log warning message= ("Total Wireless Clients of Radio: " . $totalWirelessInt)
######The following DOES NOT work:######
:local wirelessNAME;
:set wirelessNAME "wlan1";
:local totalWirelessInt
#Set total wireless registrations
:set totalWirelessInt [/interface wireless registration-table print count-only where name=$wirelessNAME];
:log warning message= ("Total Wireless Clients of Radio: " . $totalWirelessInt)