Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: pretty easy thing but too hard for me! (random array element)



On Thu, Aug 02, 2007 at 02:25:22PM -0600, fREW wrote:
> If you want complete awesomeness (sorry, didn't realize it was
> originally off-list) you at least need all of the files:
> 
> #!/usr/bin/ruby -w
> 
> Fromat = "http://www.qwantz.com/comics/comic2-%02i.png";
> 
> 2.upto(1072) do |i|
>   `wget #{sprintf(Fromat, i)}`
>   sleep 1
> end

Why not

#!/bin/zsh
for i in {2..1072}
do
   wget $(printf "http://www.quantz.com/comics/comic2-%02i.png"; $i)
   sleep 1
done



Messages sorted by: Reverse Date, Date, Thread, Author