Skip to content

Instantly share code, notes, and snippets.

@karlcow
Created August 6, 2013 22:22
Show Gist options
  • Save karlcow/6169269 to your computer and use it in GitHub Desktop.
Save karlcow/6169269 to your computer and use it in GitHub Desktop.
httpie seems to not grok multiple lines.
http GET http://www.otsukare.info/ | grep '<a href="/2' | sed 's,.*<a href="\(.*\)" rel=".*,http://www.otsukare.info\1,' | xargs http HEAD
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 5082
Content-Location: ua-sniffing-club.html
Content-Type: text/html
Date: Tue, 06 Aug 2013 22:18:53 GMT
ETag: "1d1c0f6-13da-4e34c6d807f40;4e34c6d807f40"
Last-Modified: Tue, 06 Aug 2013 19:28:21 GMT
Server: Apache
TCN: choice
Vary: negotiate
@karlcow
Copy link
Author

karlcow commented Aug 8, 2013

solved by adding -n1 to http. Thanks Rik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment