Forked from rvflash/curl-header-with-follow-redirect.sh
Created
August 25, 2018 16:06
-
-
Save hannesbe/3ef476e42c97749c8a0d1275fe0c9a9a to your computer and use it in GitHub Desktop.
Display request headers with command line curl and follow redirects
This file contains 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
#!/usr/bin/env bash | |
declare -- url="$1" | |
if [[ -z "$url" ]]; then | |
echo "Missing url" | |
exit 1 | |
fi | |
# @example https://goo.gl/ | |
curl -sLD - "$url" -o /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment