curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Naming ETag files?

From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Sat, 14 Jan 2023 18:01:16 -0700

On 1/14/23 13:57:19, Timothe Litt via curl-users wrote:
> On 14-Jan-23 13:21, Daniel Stenberg via curl-users wrote:
>>
>>> I would like to save my --etag-compare and --etag-save (probably the same name) files with names generated from the --remote-header-name; perhaps as simple as "$remote-header-name.ETag".  Is there an orderly and reliable way to do this?
>>
>> No there isn't. With some clever thinking maybe we can offer this in the future!

My fallback is to do a trial download to a write-protected directory.
It promptly fails, but "--write-out %{filename_effective}" works regardless,
giving the filename I need.

>> Having "${variables}" work more broadly would be cool but tricky since they are all available/done at different point in times, and generally safe to get *after* the transfer is complete...
>>
> I'd much rather see command lines get shorter and simpler than longer.
>
> Rather than more command line clutter, consider that dotfiles are a convenient place to store metadata.

But don't move the clutter from the command line to the users' home directories.
Put them in ~/.curl/*.

Command substitution enables this with no changes to curl, as in:
     curl $( ~/.curl/optXXX.rc ) URL

-- 
gil
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-01-15