Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by stabbles

4 hours ago

Would be nice if `curl` had something to dump headers to a third file descriptor while outputting the response on stdout.

3 comments

stabbles

Reply

homebrewer  2 hours ago

This should work?

  curl --dump-header /dev/fd/xxx https://google.com

or

  mkfifo headers.out
  curl --dump-header headers.out https://google.com

unless I'm misunderstanding you.

  • stabbles  2 hours ago

    Ah yeah, `/dev/fd/xxx` works :) somehow thought that was Linux only.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities