From 3081c151bd1e88d12ef527d40075cbfc7a18d890 Mon Sep 17 00:00:00 2001 From: WaLLy3K Date: Thu, 11 May 2017 09:13:32 +1000 Subject: [PATCH] Perform EXACT searches on HOSTS lists correctly `\s` on the end may be overkill, but it is the existing scanList() behaviour. --- pihole | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pihole b/pihole index eaf4e955..6bd5fb1f 100755 --- a/pihole +++ b/pihole @@ -86,7 +86,7 @@ scanList(){ method="${3}" if [[ ${method} == "-exact" ]]; then - grep -i -E -l "(^|\/)${domain}($|\/)" ${list} + grep -i -E -l "(^|\s|\/)${domain}($|\s|\/)" ${list} else grep -i "${domain}" ${list} fi