Skip to content

Instantly share code, notes, and snippets.

@ibtaylor
Created August 28, 2011 02:49
Show Gist options
  • Save ibtaylor/1176179 to your computer and use it in GitHub Desktop.
Save ibtaylor/1176179 to your computer and use it in GitHub Desktop.
recursively follow http redirects displaying each url
#!/bin/bash
[ $# != 1 ] && exit
url=$1
echo "$url"
curl -sLI "$url" | sed -n -e 's/^Location: //p' -e 's/\r//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment