Created
November 11, 2015 00:20
-
-
Save snada/12bf6b818cf38e544a1b to your computer and use it in GitHub Desktop.
Getting redirect target url with curl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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