On Tue, 05 Apr 2005 13:35, Carl Cerecke wrote: > Volker Kuhlmann wrote: > > Nick(?) was looking for a short way to create a bunch of URLs differing > > only in a numeral. > > For http://localhost/foo[5-12], how about: > > sh -c "wget http://localhost/foo{$(python -c 'print > "{"+str(range(5,13)).replace(" ","")[1:-1]+"}"')}" > > for number n to m, replace the range(5,13) with range(n,m+1) > > Don't know about "short", but at least I didn't use perl :-)
I'm not so sure about 'short' either but at least my offering both works and is wholly in shell. To wit:- sh -c "wget http://localhost/foo{$(printf "%02d," `seq 5 12`)13}" -- C. S.
