Buy commercial curl support. 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 Daniel himself.
Re: Reference upload glob pieces in output filename
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Bastian Jesuiter via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 22 Apr 2026 10:07:55 +0200
Maybe something like
curl -T 'file{<glob1>1,2,3}' https://upload.example/{<glob2>this,that} -o
'response-#<glob1>-#<glob2>'
Although < > are bash special cars, inside of strings they could be used I
guess.
As regex usually uses (?<namedGroup>) for it's syntax it would be familiar.
Alternatively omitting the <> in the second part where the replacement
happens would also be good for readability, but would make it probably
impossible to know when the named group ends and the string continues.
On Wed, 22 Apr 2026, 10:00 Daniel Stenberg, <daniel_at_haxx.se> wrote:
> On Wed, 22 Apr 2026, Bastian Jesuiter wrote:
>
> > Would something more explicit, like something close or similar to regex
> > named groups possible to circumvent such a confusion?
>
> How do you envision a command line to look like if that would be used?
>
> --
>
> / daniel.haxx.se || https://rock-solid.curl.dev
>
Date: Wed, 22 Apr 2026 10:07:55 +0200
Maybe something like
curl -T 'file{<glob1>1,2,3}' https://upload.example/{<glob2>this,that} -o
'response-#<glob1>-#<glob2>'
Although < > are bash special cars, inside of strings they could be used I
guess.
As regex usually uses (?<namedGroup>) for it's syntax it would be familiar.
Alternatively omitting the <> in the second part where the replacement
happens would also be good for readability, but would make it probably
impossible to know when the named group ends and the string continues.
On Wed, 22 Apr 2026, 10:00 Daniel Stenberg, <daniel_at_haxx.se> wrote:
> On Wed, 22 Apr 2026, Bastian Jesuiter wrote:
>
> > Would something more explicit, like something close or similar to regex
> > named groups possible to circumvent such a confusion?
>
> How do you envision a command line to look like if that would be used?
>
> --
>
> / daniel.haxx.se || https://rock-solid.curl.dev
>
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2026-04-22