Linux.com

shame on me

Posted by: Anonymous Coward on September 18, 2005 06:39 PM
I just discovered that the 'for' command (in bash at least) has a variant that allows C like iterations.

I have been using the 'while' syntax in bash for about 10 years. Better late than never<nobr> <wbr></nobr>:-)

for ((i=1;i<1000;i++)) ; do

    N=`printf %03d $i`

    wget <a href="http://www.dummy.net/img/pict$N.jpg" title="dummy.net">http://www.dummy.net/img/pict$N.jpg</a dummy.net>
done

#

Return to CLI Magic: the word on wget