mirror of
https://github.com/wifinigel/MikrotikScripting.git
synced 2025-12-09 03:59:29 +00:00
initial commit
This commit is contained in:
commit
c782dde326
61 changed files with 1457 additions and 0 deletions
9
scripts/ch8-05-foreach-kv.rsc
Normal file
9
scripts/ch8-05-foreach-kv.rsc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# filename: ch8-05-foreach-kv.rsc
|
||||
|
||||
# define an array of interface data
|
||||
:local InterfaceErrors {"WAN"=514; "LAN"=0; "ether3"=0; "ether4"=0; 5};
|
||||
|
||||
# use a foreach loop to print out the error value for each interface
|
||||
:foreach InterfaceName,ErrorCounter in=$InterfaceErrors do={
|
||||
:put "$InterfaceName errors: $ErrorCounter";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue