Hi All,
When I try to run the following code
event zeek_init()
{
local v: vector of interval = vector(1min,2min,1min,4min,6min,1min);
local vo : vector of interval = sort(v);
for (i in vo){
print vo[i];
}
}
I get the expected output by as well I obtain the following error:
line 4: comparison function required for sort() with non-integral types (sort(v)) fatal error: errors occurred while initializing
I have followed the documentation.
https://docs.zeek.org/en/current/scripts/base/bif/zeek.bif.zeek.html#sort
But I quite don’t understand the part about the comparison function as a second argument. What parameter should be placed as a second argument?
Tomasz