From cd8a423b32cd3900861085f9f64affc14cb544f2 Mon Sep 17 00:00:00 2001 From: xch12i5 <40517505+xCh12i5@users.noreply.github.com> Date: Sun, 20 Jan 2019 16:04:07 +0100 Subject: [PATCH] Solves RegEx issue and updates documentation. Signed-off-by: xch12i5 <40517505+xCh12i5@users.noreply.github.com> --- gravity.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gravity.sh b/gravity.sh index 7b9116a4..6fe9be06 100755 --- a/gravity.sh +++ b/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