Hey everyone,
So, I’m trying to figure out how to use curl to print the location header from a response. I’ve been messing around with it for a bit, but I can’t seem to get it right.
I know you can use `-I` to get the headers, but I only want the location header specifically. Is there a way to filter it out?
I tried something like `curl -s -o /dev/null -w "%{redirect_url}" http://example.com`, but it’s not giving me what I need. Am I missing something obvious?
Also, if anyone knows a quick way to curl print location header without all the extra stuff, that’d be awesome.
Thanks in advance!
So, I’m trying to figure out how to use curl to print the location header from a response. I’ve been messing around with it for a bit, but I can’t seem to get it right.
I know you can use `-I` to get the headers, but I only want the location header specifically. Is there a way to filter it out?
I tried something like `curl -s -o /dev/null -w "%{redirect_url}" http://example.com`, but it’s not giving me what I need. Am I missing something obvious?
Also, if anyone knows a quick way to curl print location header without all the extra stuff, that’d be awesome.
Thanks in advance!
