From 760dd01b50330cb97affeddfe5462d847bac3df0 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 7 Aug 2018 18:36:06 +0200 Subject: [PATCH] Use grep invert-match Signed-off-by: DL6ER --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 2836ec1f..026cd4a4 100755 --- a/gravity.sh +++ b/gravity.sh @@ -464,7 +464,7 @@ gravity_ShowBlockCount() { fi if [[ -f "${regexFile}" ]]; then - num=$(grep -c "^[^#]" "${regexFile}") + num=$(grep -cv "^#" "${regexFile}") echo -e " ${INFO} Number of regex filters: ${num}" fi }