Selecting records

Hi all,
I want to select some simple queues according IP address. I have some queues from subnet 192.168.15.0/24 (about 20 queues). I want to select only them, for example :put [find target-address=192.168.15.xxx], but I’ don’t know how to express it. I didn’t find anyting similar in manuals. Thanks for answers.

use :for to accomplish this, but in this case those 20 IP should be with the same step. For example, if you have IPs from 192.168.15.10 to 192.168.15.20 then:

/queue simple {:for i from 10 to 20 do=[:put [find target-address=(“192.168.15.” . $i)]}

Edgars

well, it’s not exactly what I wanted, I looked for something like “looking for some*”. But this is probably currently unable.
No matter, thanks for answer.

maybe you can write what exactly is the aim you want to reach? What would you like to do with those queues which are found?

Edgars

I want to export only a part of all my simple queues, in this example all queues belonging to subnet 192.168.15.0/24. So I want to select all simple queues, that have a begin 192.168.15.xxx:

/queue simple export from [find target-address=192.168.15.10]

this command will export only address 192.168.15.10 and my idea is by some simple trick select all queues with 192.168.15. begining, maybe something like this:

/queue simple export from [find target-address=192.168.15.*]

I didn’t find way how to do it, I’m sorry, if I looked bad.

no, it’s not possible. Maybe in v2.9, but it will be very complex script.

Edgars

Very complex script, indeed :laughing:

:global temp1; :set temp1 ""; :for i from 1 to 254 do={:set temp1 ($temp1 . "," . [/queue simple find target-address=(192.168.15. . $i)])}; /queue simple export from ($temp1);