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

18 Replies, 909 Views

curl using file descriptor is *chef’s kiss* for scripting.

For outputs:
```bash
exec 3> output.txt
curl -o /dev/fd/3 http://example.com
```

Cleaner than `>>` and no risk of truncation.

Bonus: Works great with `lsof` if you need to debug what’s holding the fd open.

Messages In This Thread



Users browsing this thread: 1 Guest(s)