mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Merge pull request #2830 from mmotti/fix/regexp_query
Fix potential invalid result for pihole -q
This commit is contained in:
commit
b78cbb98d8
@ -41,7 +41,7 @@ scanList(){
|
|||||||
# Iterate through each regexp and check whether it matches the domainQuery
|
# Iterate through each regexp and check whether it matches the domainQuery
|
||||||
# If it does, print the matching regexp and continue looping
|
# If it does, print the matching regexp and continue looping
|
||||||
# Input 1 - regexps | Input 2 - domainQuery
|
# 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;;
|
<(echo "${lists}") <(echo "${domain}") 2>/dev/null;;
|
||||||
* ) grep -i "${esc_domain}" ${lists} /dev/null 2>/dev/null;;
|
* ) grep -i "${esc_domain}" ${lists} /dev/null 2>/dev/null;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user