Community discussions

MikroTik App
 
wildbill442
Forum Guru
Forum Guru
Topic Author
Posts: 1055
Joined: Wed Dec 08, 2004 7:29 am
Location: Sacramento, CA

Predefined variables or declaring variables?

Fri May 27, 2011 6:13 pm

Anyone know if there are any predefined variables for use when creating functions in the dude? Or does anyone know the syntax for creating/using variables?

I'm trying to write a function that needs arguments passed to it.. is this possible?
 
wildbill442
Forum Guru
Forum Guru
Topic Author
Posts: 1055
Joined: Wed Dec 08, 2004 7:29 am
Location: Sacramento, CA

Re: Predefined variables or declaring variables?

Fri May 27, 2011 6:19 pm

Here's an example:

function wireless_interface($arg1)
{
ros_command("interface wireless registration-table print count-only where interface='$arg1'")
}

wireless_interface(wlan1) -> returns value to dude for specified interface.

 
JorgeAmaral
Trainer
Trainer
Posts: 199
Joined: Wed Mar 04, 2009 11:53 pm
Location: /ip route add type=blackhole

Re: Predefined variables or declaring variables?

Mon Jun 20, 2011 4:11 am

Here's an example:

function wireless_interface($arg1)
{
ros_command("interface wireless registration-table print count-only where interface='$arg1'")
}

wireless_interface(wlan1) -> returns value to dude for specified interface.

Hi,

Have you found if it´s possible?

I´m looking for this too.

Best regards
 
wildbill442
Forum Guru
Forum Guru
Topic Author
Posts: 1055
Joined: Wed Dec 08, 2004 7:29 am
Location: Sacramento, CA

Re: Predefined variables or declaring variables?

Tue Jul 12, 2011 2:44 am

Apparently it is not possible at this time. No idea if and when it will be.

Who is online

Users browsing this forum: No registered users and 24 guests