Skip to content

Instantly share code, notes, and snippets.

@Porrapat
Last active January 9, 2020 11:28
Show Gist options
  • Save Porrapat/f00513ce566261b20679333b6eda7f8b to your computer and use it in GitHub Desktop.
Save Porrapat/f00513ce566261b20679333b6eda7f8b to your computer and use it in GitHub Desktop.
# Curl to list of website and get it's title html tag
# Useful for checking code quality of many websites.
# requirement : you must install HTML-XML-utils first by
# sudo apt-get install html-xml-utils
now=$(date)
URLs=(
"google.com"
"facebook.com"
"ideavivat.com"
)
for URL in "${URLs[@]}"
do
echo "For $URL"
curl -sL "$URL" | hxnormalize -x 2>/dev/null | hxselect -c 'title' | tr -d '\n' ; echo ""
echo "================"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment