How can I use curl with a file descriptor for better performance? or Is there a way to handle curl us

18 Replies, 914 Views

Not a noob question at all! Curl using file descriptor is a power move.

For reads, you can do `-d @/dev/fd/3` or similar.

Why bother? Temp files are messy, and if you’re dealing with pipes or process substitution, fds keep everything in memory. Plus, no cleanup!

One gotcha: make sure the fd is open and readable/writable before curl touches it. Otherwise, 💥.

Messages In This Thread



Users browsing this thread: 1 Guest(s)