From c9e52a5d16939c054eab947a3b66e9124e33773b Mon Sep 17 00:00:00 2001 From: lookshe Date: Sat, 16 Mar 2019 13:20:01 +0100 Subject: use awk a bit smarter --- retrieveAdBlocklists.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'retrieveAdBlocklists.sh') diff --git a/retrieveAdBlocklists.sh b/retrieveAdBlocklists.sh index 480ee48..38643c0 100755 --- a/retrieveAdBlocklists.sh +++ b/retrieveAdBlocklists.sh @@ -1,4 +1,3 @@ #!/bin/bash -while read p; do - echo "$p" | awk '{split($0,a,"|"); system("curl -s " a[2] " > adlists/"a[1])}' -done < adfilelist.txt +rm -rf adlists/* +awk -F'|' '{system("wget -q -O adlists/" $1 " " $2)}' adfilelist.txt -- cgit v1.2.3