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