Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMMotti <matthew.w.motti@gmail.com>2019-07-03 15:04:57 +0300
committerMMotti <matthew.w.motti@gmail.com>2019-07-03 15:04:57 +0300
commit04abcb71f62acb12c60f79de61db510e29fcb42c (patch)
treeccb29ab2807705f02075c5ba7b03057a10523bda /advanced/Scripts/query.sh
parentc9a843b417f3a6e306b9b884458243e99d553597 (diff)
Fix potential invalid result for pihole -q
Signed-off-by: MMotti <matthew.w.motti@gmail.com>
Diffstat (limited to 'advanced/Scripts/query.sh')
-rwxr-xr-xadvanced/Scripts/query.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/advanced/Scripts/query.sh b/advanced/Scripts/query.sh
index 42ea4395..b7edaccf 100755
--- a/advanced/Scripts/query.sh
+++ b/advanced/Scripts/query.sh
@@ -41,7 +41,7 @@ scanList(){
# Iterate through each regexp and check whether it matches the domainQuery
# If it does, print the matching regexp and continue looping
# Input 1 - regexps | Input 2 - domainQuery
- "regex" ) awk 'NR==FNR{regexps[$0]}{for (r in regexps)if($0 ~ r)print r}' \
+ "regex" ) awk 'NR==FNR{regexps[$0];next}{for (r in regexps)if($0 ~ r)print r}' \
<(echo "${lists}") <(echo "${domain}") 2>/dev/null;;
* ) grep -i "${esc_domain}" ${lists} /dev/null 2>/dev/null;;
esac