Created
October 29, 2015 16:27
-
-
Save dasginganinja/d0615bb45537a2322790 to your computer and use it in GitHub Desktop.
HTTP Status checking
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
# Check for number of urls with 200 statuses | |
grep 200 out.txt | wc -l |
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
# One at a time | |
cat urls.txt | xargs -I ^ curl -o /dev/null -sw "%{url_effective}\\t %{http_code}\\t %{redirect_url}\\n" ^ > out.txt | |
# parallelization using xargs | |
cat urls.txt | xargs -P 20 -I ^ curl -o /dev/null -sw "%{url_effective}\\t %{http_code}\\t %{redirect_url}\\n" ^ > out.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment