On Tuesday July 22 2008 09:04, you wrote:
>> for i in 1 2 3 4 5 6 7 8 9; do
>> ftp http://openbsd.org/faq/faq0${i}.html
>> done
>> for i in 10 11 12 13 14 15; do
>> ftp http://openbsd.org/faq/faq${i}.html
>> done
>
>Wouldn't it be simpler to be done in one loop?
>
>for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
> ftp http://openbsd.org/faq/faq${i}.html
>done
>ftp http://openbsd.org/faq/index.html
Note that the 2 loops are not the same. You'd need:
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
ftp http://openbsd.org/faq/faq`printf %02d $i`.html
done
The number list could be collapsed into `seq 1 15` on a system with seq
installed.
------------------------------------------------------------------------
Dan Ramaley Dial Center 118, Drake University
Network Programmer/Analyst 2407 Carpenter Ave
+1 515 271-4540 Des Moines IA 50311 USA