Setup guide

prefix :
action for
action_args i
params[=values] from=1 to=10 do={:put $i}
/interface monitor-traffic ether1,ether2,ipip1
prefix /
path interface
action monitor-traffic
action_args ether1,ether2,ipip1
Expression Grouping
Description
This feature provides the easy way to execute commands from within one command level, by
enclosing them in braces '{ }'.
Notes
You should not change current command level in scripts by typing just it's path, without any
command, like you when working with console interactively. Such changes have no effect in
scripts. Consider the following:
admin@Wandy] ip address> /user {
{... /ip route
{... print
{... }
Flags: X - disabled
0 ;;; system default user
name="admin" group=full address=0.0.0.0/0
1 name="x" group=write address=0.0.0.0/0
2 name="y" group=read address=0.0.0.0/0
[admin@Wandy] ip route>
Although the current command level is changed to /ip route, it has effect only on next command
entered from prompt, print command is still considered to be /user print.
Example
We will add two users to the user menu in the example below:
[admin@Wandy] ip address> /user {
{... add name=x password=y group=write
{... add name=y password=z group=read
{... print
{... }
Flags: X - disabled
0 ;;; system default user
name="admin" group=full address=0.0.0.0/0
1 name="x" group=write address=0.0.0.0/0
2 name="y" group=read address=0.0.0.0/0
[admin@Wandy] ip address>