Skip to content

Instantly share code, notes, and snippets.

@rvflash
Created July 9, 2016 20:54
Show Gist options
  • Save rvflash/24b1a3791ada681fc68888089bf4fb4a to your computer and use it in GitHub Desktop.
Save rvflash/24b1a3791ada681fc68888089bf4fb4a to your computer and use it in GitHub Desktop.
Display request headers with command line curl and follow redirects
#!/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