My code
#!/bin/bash
for (( c=0; c<=1127; c++ ))
do
id = 9694 + c
if (id < 10000); then
wget http://myurl.de/source/image/08_05_27_0${id}.jpg
else
wget http://myurl.de/source/image/08_05_27_${id}.jpg
fi
done
I only get
./get.sh: line 5: 10000: No such file or directory
--2009-05-06 11:20:36-- http://myurl.de/source/image/08_05_27_.jpg
without the number.
The corrected code:
#!/bin/bash
for (( c=0; c<=1127; c++ ))
do
id=$((9694+c))
if (id -lt 10000); then
wget http://myurl.de/source/image/08_05_27_0${id}.jpg
else
wget http://myurl.de/source/image/08_05_27_${id}.jpg
fi
done
And even better:
for i in $(seq 9694 10821) ; do
_U=`printf "http://myurl.de/source/image/08_05_27_%05d.jpg" $i`
wget $_U
done