Created
March 14, 2017 03:35
-
-
Save jozic/a4873cd9093cfdf2bcf34c7dceecf49a to your computer and use it in GitHub Desktop.
resolve_url
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
# expects single url parameter, returns url following redirects | |
resolve_url() { | |
curl -w "%{url_effective}\n" -I -L -s -S $1 -o /dev/null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment