Use grep invert-match

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2018-08-07 18:36:06 +02:00
parent 5bf90cb77d
commit 760dd01b50
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -464,7 +464,7 @@ gravity_ShowBlockCount() {
fi fi
if [[ -f "${regexFile}" ]]; then if [[ -f "${regexFile}" ]]; then
num=$(grep -c "^[^#]" "${regexFile}") num=$(grep -cv "^#" "${regexFile}")
echo -e " ${INFO} Number of regex filters: ${num}" echo -e " ${INFO} Number of regex filters: ${num}"
fi fi
} }