Skip to content

Instantly share code, notes, and snippets.

@shturm
Created January 25, 2019 16:55
Show Gist options
  • Save shturm/e185f0b6f91380cc2b22ba2a01dfeb6c to your computer and use it in GitHub Desktop.
Save shturm/e185f0b6f91380cc2b22ba2a01dfeb6c to your computer and use it in GitHub Desktop.
wget a page recursively or not
#!/bin/bash
echo "Getting $2 levels of $1"
if [ "$2" = "" ]; then
wget -k -p -nc -r -l 1 $1
exit
fi
wget -k -p -nc -r -l $2 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment