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.
Complex Globbing
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Rodrigo s via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 20 Feb 2024 11:02:55 -0300
Curl globbing is really good. You can use [] to sequence and {} to list.
But.... Why not do various sequences?
This is from the manual:
curl "http://{site,host}.host[1-5].example" -o "#1_#2"
But, why if I want to do various sequences, like download 1-5 and 10-15 but
not 6-9?
curl "http://{site,host}.host*[1-5,10-15]*.example" -o "#1_#2"
And why not mix everything. Sequence and text:
curl "http://{site,host}.host*{[1-5],[10-15],ana,bob}*.example" -o "#1_#2"
So, it will download 1-5, 10-15, ana and bob (from site.hot and host.host).
Look like the same command can be done by:
curl "http://{site,host}.host*[1-5]*.example" -o "#1_#2" "http://
{site,host}.host*[10-15]*.example" -o "#1_#2" http://{site,host}.host
*{ana,bob}*.example" -o "#1_#2"
This is a lot of text! Today I can't do the same thing, right? Just need to
do the last command?
Date: Tue, 20 Feb 2024 11:02:55 -0300
Curl globbing is really good. You can use [] to sequence and {} to list.
But.... Why not do various sequences?
This is from the manual:
curl "http://{site,host}.host[1-5].example" -o "#1_#2"
But, why if I want to do various sequences, like download 1-5 and 10-15 but
not 6-9?
curl "http://{site,host}.host*[1-5,10-15]*.example" -o "#1_#2"
And why not mix everything. Sequence and text:
curl "http://{site,host}.host*{[1-5],[10-15],ana,bob}*.example" -o "#1_#2"
So, it will download 1-5, 10-15, ana and bob (from site.hot and host.host).
Look like the same command can be done by:
curl "http://{site,host}.host*[1-5]*.example" -o "#1_#2" "http://
{site,host}.host*[10-15]*.example" -o "#1_#2" http://{site,host}.host
*{ana,bob}*.example" -o "#1_#2"
This is a lot of text! Today I can't do the same thing, right? Just need to
do the last command?
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-02-20