Complex Globbing

Rodrigo s via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <CAH8erehndo6UQf8k-vCJBkKXUzHWVBG12+WQ=FgXQmvtAGiKhA@mail.gmail.com>
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.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.