Community discussions

MikroTik App
 
WisperISP
just joined
Topic Author
Posts: 20
Joined: Wed Jun 02, 2004 8:05 pm
Location: St Louis
Contact:

Passing Parameters

Sat Nov 27, 2004 4:19 pm

I would like to setup a generic script to test to see if an IP address is up by running a ping test 5 times. Got that part from the examples. However, I would like to run the script with a parameter. The parameter would be the IP address I wanted to test.

This would greatly cut down the number of scripts I would have to maintain.

Thanks
 
User avatar
[ASM]
Member Candidate
Member Candidate
Posts: 284
Joined: Sun Jun 06, 2004 12:59 am
Location: Sofia, Bulgaria
Contact:

Sun Nov 28, 2004 5:45 am

I think that this will work:
:global ip; :set ip "xxx.yyy.zzz.www"; /system script run ping_script

and ping_script uses the $ip variable...

it works quite fine for passing values from script to console
 
WisperISP
just joined
Topic Author
Posts: 20
Joined: Wed Jun 02, 2004 8:05 pm
Location: St Louis
Contact:

Mon Nov 29, 2004 6:20 am

Thanks

Not as clean as I would like, but it works great.

Who is online

Users browsing this forum: adrianh and 118 guests