mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Solves RegEx issue and updates documentation.
Signed-off-by: xch12i5 <40517505+xCh12i5@users.noreply.github.com>
This commit is contained in:
parent
e02da90faa
commit
cd8a423b32
1 changed files with 5 additions and 5 deletions
10
gravity.sh
10
gravity.sh
|
@ -340,11 +340,11 @@ gravity_ParseFileIntoDomains() {
|
|||
# 3) Remove lines containing "#" or "/"
|
||||
# 4) Remove leading tabs, spaces, etc.
|
||||
# 5) Delete lines not matching domain names
|
||||
< ${source} tr -d "\r" | \
|
||||
tr "[:upper:]" "[:lower:]" | \
|
||||
sed -r "/(\/|#).*$/d" | \
|
||||
sed -r "s/^.*\s+//g" | \
|
||||
sed -r "/([^\.]+\.)+[^\.]{2,}/!d" > ${destination}
|
||||
< ${source} tr -d '\r' | \
|
||||
tr '[:upper:]' '[:lower:]' | \
|
||||
sed -r '/(\/|#).*$/d' | \
|
||||
sed -r 's/^.*\s+//g' | \
|
||||
sed -r '/([^\.]+\.)+[^\.]{2,}/!d' > ${destination}
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue