Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Created September 3, 2018 13:42
Show Gist options
  • Save jgamblin/babfc5296ac34c8b90236eddfb0a4684 to your computer and use it in GitHub Desktop.
Save jgamblin/babfc5296ac34c8b90236eddfb0a4684 to your computer and use it in GitHub Desktop.
Simple Bash Script To Take A Long List Of Domains And Return Only Ones With Webpages.
#!/bin/bash
for url in $(cat domains.txt)
do
if curl --output /dev/null --silent --head --fail "$url"; then
printf "$url \\n"
else
:
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment