From 7d6e60a96a9a4dda2a95745f7cba64a49c72498f Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 8 Apr 2016 21:42:41 +0200 Subject: [PATCH] FIx urllist --- mkurllist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkurllist b/mkurllist index ca7f967..e7ee42f 100755 --- a/mkurllist +++ b/mkurllist @@ -24,12 +24,13 @@ cd $tmp rdupes() { [ "$1" != "" ] && { echo "Remove all duplicates for $*" - sed -i 's/\/\//\//g;s/\/$//g' $dir/urllist awk '!seen[$0]++' $* $dir/urllist >$dir/final mv $dir/final $dir/urllist rm $* } + sed -i 's/\/\//\//g;s/\/$//g;s/http:\//http:\/\//g;s/http:\/\/\//http:\/\//g' $dir/urllist + for dl in $(cat $dir/urllist); do { a=$(curl -w "%{url_effective}\n" -L -f -s -I -S "$dl" -o /dev/null) [ $? = "0" ] && echo "$a" >> $dir/final