Crawling sequantial images with shell script
Let say you want to download from http://www.domain.com/images/, and you know that the images name is from 001 to 100
Lets write a shell script
1 |
|
- First declare a maximum number for the images’ name
- Write a
for
loop to iterate through from 1 _(as the images’ name is start from 1)_to the maximum - The command inside backquote (`) basically is refer to sub-command which will pass the output to the
url
. In this case is usingprintf
to format the image name with trailing **00** in front if it then store inurl
variable - Finally use
wget
to download the images