Re: Reference upload glob pieces in output filename

Daniel Stenberg via curl-users <[email protected]> Wed, 22 Apr 2026 09:53:44 +0200 (CEST)
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On Wed, 22 Apr 2026, Stefan Eissing wrote:

>>  curl -T 'file{1,2,3}' https://upload.example/ -o 'response-!1'
>>
>> Maybe we can think of a better way?
>
> Have not looked at the internals. As a user, I would expect `-o 'save-#1' to 
> also work for uploads.
>
> (I assume the #1 counter only counts url globs and not upload globs, but 
> that is an implementation detail, or?)

Here's an example that shows why they need to be different (in some way):

   curl -T 'file{1,2,3}' https://upload.example/{this,that} -o 'response-!1-#1'

-- 

  / daniel.haxx.se || https://rock-solid.curl.dev
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html