Calling Program from Command Line for a Variable Range
Gideon Weems

Hi, all. I'm just a simple bumpkin and will present my problem without abstracting anything:

wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/1.gif
wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/2.gif
wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/3.gif
wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/4.gif
...
wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/X.gif

I don't have many tools in my box... Please help me. I want to call a program from the command line in the above fashion--automatically incrementing an interger and substituting the string value of the integer for the set [1-X].

What standard tool is best suited for this task? Thank you so much for your time.

Yes, they are smileys. :)

Matthew Leverton
<?php for($x=1;$x<100;++$x) `wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/$x.gif`; ?>

Any scripting language can do the above...

Even in C, it's probably a 3 line program.

Kitty Cat

for i in `seq 1 100` ; do wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/${i}.gif ; done

Gideon Weems

Wonderful! This is how you do it from the Windows command prompt:
for /L %i in (1,1,300) do wget -r -l1 --no-parent http://img.mixi.jp/img/emoji/%i.gif
Thank you for helping me.

Thread #593226. Printed from Allegro.cc