Page 1 of 1

egrep -vf doesn't work when file is empty

Posted: Fri Sep 25, 2020 1:30 pm
by sslimani
Hi,

I try to write a Nagios agent script to check debsums with ignoring files in /etc/debsums-ignore, so I used the command:
"debsums -cs 2>&1 | egrep -vf "$ignorefile"
This command dosn't work when the file $ignorefile (which is /etc/debsums-ignore) is empty and it gives no result although there are modified files,

Anyone have an idea about this please?

Re: egrep -vf doesn't work when file is empty

Posted: Mon Sep 28, 2020 2:45 pm
by ssax
I apologize but we don't consult on custom development. I tested the command on my system and seems to work properly with an empty /etc/debsums-ignore file, maybe it's your version of egrep?

Make sure you user (usually nagios user) has access to /etc/debsums-ignore, make sure $ignorefile is always set,

We do offer paid custom development/consulting, if that is something you're interested in you can reach out to [email protected] to get more information/a quote.

Thank you!