mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:33:36 +03:00
tool_urlglob: add named globs
Idea-by: Bastian Jesuiter Verified by test 2408 - 2411 Closes #21409
This commit is contained in:
parent
2a2104f3cf
commit
cb0636980b
13 changed files with 432 additions and 58 deletions
|
|
@ -39,4 +39,17 @@ probably have to put the full URL within double quotes to avoid the shell from
|
|||
interfering with it. This also goes for other characters treated special, like
|
||||
for example '&', '?' and '*'.
|
||||
|
||||
The separate globbing components can be referenced in the --output option to
|
||||
allow pieces to be reused in the target filename.
|
||||
|
||||
Starting in curl 8.21.0, the separate globbing parts can be named and
|
||||
referenced by their names. The case sensitive alphanumeric name is set
|
||||
enclosed within angle brackets after the opening character. Examples:
|
||||
|
||||
https://fun.example/{<number>one,two,three}.jpg
|
||||
|
||||
ftp://ftp.example.com/file[<range>1-100].txt
|
||||
|
||||
Setting the same glob name twice is an error.
|
||||
|
||||
Switch off globbing with --globoff.
|
||||
|
|
|
|||
|
|
@ -69,3 +69,14 @@ override curl's internal binary output in terminal prevention:
|
|||
|
||||
Note that the binary output may be caused by the response being compressed, in
|
||||
which case you may want to use the --compressed option.
|
||||
|
||||
Starting in curl 8.21.0, the separate globbing parts can be named and
|
||||
referenced by their names. The case sensitive alphanumeric name is set
|
||||
enclosed within angle brackets after the opening character. Examples:
|
||||
|
||||
curl "https://fun.example/{<num>one,two}.jpg" -o "save-#<num>"
|
||||
|
||||
curl "ftp://ftp.example/file[<range>1-100].txt" \
|
||||
-o "save-#<range>.txt"
|
||||
|
||||
Referencing a named glob that is not set, causes an error.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue