Created
October 30, 2018 15:12
-
-
Save travis-g/8e7c00269dce188b48ad7615dadecf30 to your computer and use it in GitHub Desktop.
recursive wget to check sites for broken links/dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [A "$2" -eq "-v" ]; then | |
wget --recurive --delete-after "$1" | |
else | |
wget \ | |
--spider \ | |
--recursive \ | |
--delete-after \ | |
--level inf \ | |
--no-directories \ | |
--no-host-directories \ | |
--no-verbose \ | |
--page-requisites \ | |
"$1" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment