|
Elektra
0.8.20
|
The range plugin checks if a Key's value is within a given range.
The plugin checks every Key in the KeySet for the metakey check/range which contains either a single range with the syntax [-]min-[-]max, or a list of ranges or values separated by , and tests if the Key's value is within the range(s).
check/type can be used to specify the data type. If not specified otherwise the default value is long long
Possible values:
short, long, long long
for signed integer values
unsigned short, unsigned long, unsigned long long
for unsigned integer values
float, double, long double
for floating point values
HEX
for hexadecimal values
char
for characters
None.
```
sudo kdb mount range.ecf /examples/range range dump
kdb set /examples/range/value 5 kdb setmeta /examples/range/value check/range "1-10"
kdb set /examples/range/value 11
kdb set /examples/range/value "\-1"
kdb setmeta /examples/range/value check/range "1,2,4,8"
kdb set /examples/range/value 7
kdb set /examples/range/value 2
kdb rm -r /examples/range sudo kdb umount /examples/range ```
None.
1.8.8