Page 1 of 1

name[=value] - get value

Posted: Mon Nov 06, 2006 3:56 pm
by hrober
How get value of the name[=value] into script ?

IE.
{
/ip address add address=$ipaddress interface=ether1
}
The line command:
myscript ip=192.168.0.2
(sorry for bad english)

Posted: Mon Nov 06, 2006 6:53 pm
by changeip
I don't believe you can use arguments to a script. But you can assign global variables.

ie:

:global IPAddr 192.168.0.2

then

/ip address add address=$IPAddr interface=ether1

Does that help? :global variables live as long as the router is running. Once rebooted you lose them.

Posted: Wed Nov 15, 2006 5:38 pm
by Biggs
Would it be possible to have a startup script that we can set global variables into?