Code: Select all
:local cookie "someName";
:local cookieCode do={
:put "TestIt";
/system routerboard print;
};
[[:parse (":global ".$cookie)]];
[[:parse (":global ".$cookie."; :set \$".$cookie." (\"\");")]];
/system script environment remove [find where name=$cookie];
Code: Select all
TestIt
routerboard: yes
board-name: hAP ac
model: RB962UiGS-5HacT2HnT
serial-number: XXXXXXXXXXX
firmware-type: qca9550L
factory-firmware: 6.43.10
current-firmware: 7.6
upgrade-firmware: 7.6
Code: Select all
:local cookie "someName";
:local cookieCode do={
:put "TestIt";
/system routerboard print;
};
:local cookieCode2 do={
:put "TestIt2";
/system resource print;
};
[[:parse (":global ".$cookie)]];
[[:parse (":global ".$cookie."; :set \$".$cookie." (\"\");")]];
/system script environment remove [find where name=$cookie];
Code: Select all
TestIt
routerboard: yes
board-name: hAP ac
model: RB962UiGS-5HacT2HnT
serial-number: XXXXXXXXX
firmware-type: qca9550L
factory-firmware: 6.43.10
current-firmware: 7.6
upgrade-firmware: 7.6
TestIt2
uptime: 2w6d4h21m51s
version: 7.6 (stable)
build-time: Oct/17/2022 10:55:40
factory-software: 6.43.10
free-memory: 63.7MiB
total-memory: 128.0MiB
cpu: MIPS 74Kc V5.0
cpu-count: 1
cpu-frequency: 720MHz
cpu-load: 18%
free-hdd-space: 512.0KiB
total-hdd-space: 16.0MiB
write-sect-since-reboot: 120848
write-sect-total: 1554295
bad-blocks: 0%
architecture-name: mipsbe
board-name: hAP ac
platform: MikroTik