I would like to save my online textbook for offline usage, and through Google Chrome's "Network" panel I found out the path of the images. They can be accessed through the browser and downloaded using curl if given the correct configuration ("copy cURL"). The files look like the following: "https://c.m.com/r*/p*/R*/5*/5*/2*/O*/images/page.svgz", where is the page number with four digits, e.g. page0258.svgz. I would like to batch download them using some shell syntaxes. I use fish, but I can also use other shells.
How would I achieve that four number pattern expansion on the command line?