egrep -vf doesn't work when file is empty
Posted: Fri Sep 25, 2020 1:30 pm
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?
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?