From 72be7ad5f0fde78a0bde92ad1d98502ffa6c9afd Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Thu, 12 Jul 2018 21:21:06 -0400 Subject: [PATCH] Don't count commented out regex lines Signed-off-by: Mcat12 --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 9a5a5fd7..e5795cb6 100755 --- a/gravity.sh +++ b/gravity.sh @@ -465,7 +465,7 @@ gravity_ShowBlockCount() { fi if [[ -f "${regexFile}" ]]; then - num=$(grep -c "^" "${regexFile}") + num=$(grep -c "^(?!#)" "${regexFile}") echo -e " ${INFO} Number of regex filters: ${num}" fi }