Re: Naming ETag files?
Paul Gilmartin via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
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