example:
Code: Select all
/sys script run MYSCRIPT MYVARIABLE
/sys script run MYSCRIPT MYVARIABLE
Thank you for your reply. I already read that before posting, but its not a neat solution. I wanted to pass simple variable like we do in bash.IMHO the only way is to use global variables
http://forum.mikrotik.com/viewtopic.php?f=9&t=23041
/sys scr run Myscript username1
/sys scr run Myscript username2
Ok I got it. Every time i have to change the global variable first, then run the script. two steps burdenCreate global variable with some value (username1)
:global variable username1
Use $variable in your script. When you need, simply change the value of specified variable:
:global variable username2
This way you will be able to run same script, by only changing one variable.