Let’s see you want to download a series of file from somewhere.
Which is having sequential filename.
This can be easily done with a shell script.
such as below:
for i in {1..113} do echo $i done
while am at it, why not make a PDF file out of the images file.
this may require ImageMagick to be installed first.
yum install ImageMagick -y
So, the final script would be something like..
#!/bin/bash
mkdir z
cd z
for i in {1..113}
do
# go get the image.
/usr/bin/wget https://dev.namran.com/ss/IMAGE-$i.jpg -O $i.jpg
done
# make pdf from jpg list
convert `ls -1v` ../1st-session.pdf
mv ../1st-session.pdf ~/public_html/download/
Done.
Leave a Comment