Skip to content

Instantly share code, notes, and snippets.

@linuxsocist
Created September 27, 2017 10:29
Show Gist options
  • Save linuxsocist/54d8865e4c9d274b5186cce10e428390 to your computer and use it in GitHub Desktop.
Save linuxsocist/54d8865e4c9d274b5186cce10e428390 to your computer and use it in GitHub Desktop.
#!/bin/bash
#Variables
domain=$(echo $1 | sed 's/^.*\:\/\///g' | awk -F '/' '{print $1}' | rev | awk -F '.' '{print $1"."$2}' | rev)
url=$(echo $1 | sed 's/^.*\:\/\///g')
echo -e "Downloading "$domain"\n"
sleep 1
wget \
--recursive \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains $domain \
--no-parent $url
echo -e "====================================\n"
echo -e "wgetsite has finished you may now check your download\n"
echo "===================================="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment