This question is similar to Download files from a list but it is not the same as I want to go beyond this. Please do not close as a duplicate.
I have a list of files to download in a text file foo.txt
. There is a directory foo
which I'm in, and I use wget -i ../foo.txt
to pull the files down. That's all fine and dandy.
However, what I need to do is download the files in there with a specific type of naming pattern. It's pulling down json
files that are being spit out by API calls to a specific server, but I need it to be saved in a specific pattern such as foo_1.json
, and because it's not actually linking to a foo_1.json
file it won't save it as such.
Is there any way to expand upon the wget
functionality to save files it downloads in a specific filename pattern, say, sequentially?
If not, alternative CLI methods not using wget
are acceptable.
wget
is too unwieldy for this, please feel free to suggest alternative applications and methods. – Thomas Ward Feb 11 '15 at 00:16/
in the API query on the URL - it's not saving as files because it's returned as text not as downloadable JSON files – Thomas Ward Feb 11 '15 at 00:32