I'm looking for a little more [rip]grep in xsv, i.e. adding both an exit status of 1 if nothing is found and an associated quiet mode-q in either xsv search or maybe even a new subcommand. Do you think that these would be worthwhile contributions? I'd be willing to put in the effort and provide a PR.
Background / Use Case
We have third-party tools that can output XSV. We have Icinga checks that look for $stuff in that output. Using awk and friends works but is quite cumbersome, xsv would be the perfect fit for this:
function node_is_bar {
blah | xsv xxx -d: node="^$node$" colY=bar
}
if node_is_bar
then
echo "OK $node is bar"
exit $nagios_status_ok
else
echo "CRITICAL $node is not bar"
exit $nagios_status_critical
fi
Currently, we're doing it the cumbersome way, for anyone interested in bash and awk madness, see here. We do this a lot, so I can definitely see a use case for this in xsv ;-)
I'm looking for a little more
[rip]grep
inxsv
, i.e. adding both an exit status of 1 if nothing is found and an associated quiet mode-q
in eitherxsv search
or maybe even a new subcommand. Do you think that these would be worthwhile contributions? I'd be willing to put in the effort and provide a PR.Background / Use Case
We have third-party tools that can output XSV. We have Icinga checks that look for
$stuff
in that output. Usingawk
and friends works but is quite cumbersome,xsv
would be the perfect fit for this:Currently, we're doing it the cumbersome way, for anyone interested in
bash
andawk
madness, see here. We do this a lot, so I can definitely see a use case for this inxsv
;-)