#!/bin/bash

echo "Start Downloading Distro Webpages:"
mkdir download_webpages
count=0
while IFS='' read -r url; do
    cd download_webpages
    count=$((count+1))
    echo "download $url (number $count)"
    mkdir $count
    cd $count
    echo $url > link
    now=$(date +"%F_%r_%:z_%Z")
    echo $now >> link
    wget --page-requisites --html-extension --restrict-file-names=windows $url
    cd ../..
    sleep 5
done < $1
