Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save weaver299/e44185e548196db038afcfba145c11c2 to your computer and use it in GitHub Desktop.
Save weaver299/e44185e548196db038afcfba145c11c2 to your computer and use it in GitHub Desktop.
check what a URL redirects to
check_redirect () {
echo -n "$1: ";
curl -is "$1" | grep '^Location:' | perl -pe 's/^Location: //;chop;'
echo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment