From a7f6c9b3a056d58605623429fccb4ecd85ca1f53 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 29 Mar 2019 00:08:04 +0000 Subject: [PATCH] Ignore matches that start `# ` using negative lookbehind Signed-off-by: Adam Warner --- advanced/Scripts/query.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/query.sh b/advanced/Scripts/query.sh index b599aa6b..69a3c7a4 100644 --- a/advanced/Scripts/query.sh +++ b/advanced/Scripts/query.sh @@ -54,7 +54,7 @@ scanList(){ # /dev/null forces filename to be printed when only one list has been generated # shellcheck disable=SC2086 case "${type}" in - "exact" ) grep -i -E -l "(^|\\s)${domain}($|\\s|#)" ${lists} /dev/null 2>/dev/null;; + "exact" ) grep -i -E -l "(^|(?/dev/null;; "wc" ) grep -i -o -m 1 "/${domain}/" ${lists} 2>/dev/null;; * ) grep -i "${domain}" ${lists} /dev/null 2>/dev/null;; esac