Skip to content

Instantly share code, notes, and snippets.

@snada
Created November 11, 2015 00:20
Show Gist options
  • Select an option

  • Save snada/12bf6b818cf38e544a1b to your computer and use it in GitHub Desktop.

Select an option

Save snada/12bf6b818cf38e544a1b to your computer and use it in GitHub Desktop.
Getting redirect target url with curl
# sh redirect_target.sh example.com
# -L Follow redirects
# -s Silent mode. Don't output anything
# -o FILE Write output to <file> instead of stdout
# -w FORMAT What to output after completion
curl -Ls -o /dev/null -w %{url_effective} $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment