xref: /curl/docs/cmdline-opts/_GLOBBING.md (revision 440bc97e)
1<!-- Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. -->
2<!-- SPDX-License-Identifier: curl -->
3# GLOBBING
4You can specify multiple URLs or parts of URLs by writing lists within braces
5or ranges within brackets. We call this "globbing".
6
7Provide a list with three different names like this:
8
9    "http://site.{one,two,three}.com"
10
11Do sequences of alphanumeric series by using [] as in:
12
13    "ftp://ftp.example.com/file[1-100].txt"
14
15With leading zeroes:
16
17    "ftp://ftp.example.com/file[001-100].txt"
18
19With letters through the alphabet:
20
21    "ftp://ftp.example.com/file[a-z].txt"
22
23Nested sequences are not supported, but you can use several ones next to each
24other:
25
26    "http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html"
27
28You can specify a step counter for the ranges to get every Nth number or
29letter:
30
31    "http://example.com/file[1-100:10].txt"
32
33    "http://example.com/file[a-z:2].txt"
34
35When using [] or {} sequences when invoked from a command line prompt, you
36probably have to put the full URL within double quotes to avoid the shell from
37interfering with it. This also goes for other characters treated special, like
38for example '&', '?' and '*'.
39
40Switch off globbing with --globoff.
41