Hi all,
I’m writing some scripts, and I would like to use regex’s to identify / not identify some of my rules / sets / whatever. Using a set like this (happens to be netwatch, but could be anything really):-
[admin@RTR] /tool netwatch> print
Flags: X - disabled
# HOST TIMEOUT INTERVAL STATUS
0 203.255.255.110 1s 10s up
1 ;;; Monitor through to fw.i3
116.255.255.2 1s 1m up
2 ;;; Monitor to BR AP.BR status
203.255.255.66 1s 5s down
3 ;;; Something random
203.255.255.115 1s 10s up
I can do things like:-
[admin@RTR] /tool netwatch> print where comment~"Monitor"
Flags: X - disabled
# HOST TIMEOUT INTERVAL STATUS
1 ;;; Monitor through to fw.i3
116.255.255.2 1s 1m up
2 ;;; Monitor to BR AP.BR status
203.255.255.66 1s 5s down
But I’d also like to find the opposite. Things that DON’T have “Monitor” in the comment:-
print where comment!~"Monitor"
print where !comment~"Monitor"
Either of which seem to be valid syntax, but neither of which return any values.
Getting it to work on the CLI is the first step, then I can put it into my script.
Any help, greatly appreciated!
Thanks,
Wazza