Skip to content

Instantly share code, notes, and snippets.

@salomvary
Last active September 22, 2015 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salomvary/e3bf44acfb45d6da5683 to your computer and use it in GitHub Desktop.
Save salomvary/e3bf44acfb45d6da5683 to your computer and use it in GitHub Desktop.
curl to print out the value of a given header
$ curl -sI 'http://google.com' | tr -d '\r' | awk 'BEGIN {FS=": "}/^Location/{print $2}'
http://www.google.de/?gfe_rd=cr&ei=JDsBVrqxNs7j8wfo_5OICw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment