World's largest web comic panel
Ben Scott
dragonhawk at gmail.com
Fri Sep 21 11:32:03 EDT 2012
On Fri, Sep 21, 2012 at 9:44 AM, Alan Johnson <alan at datdec.com> wrote:
>> As a halfway point, one can also do this:
>>
>> for v in n s; do for h in e w; do for x in {1..100}; do for y in
>> {1..100}; do echo http://imgs.xkcd.com/clickdrag/$y$v$x$h.png; done;
>> done; done; done > urls
>>
>> to use a for loop without needing the seq external command.
>
> Nice! And more readable than either your one liner or my use of seq.
To each their own. :) Personally I find concise expressions more
readable. :)
I suspect it may be a question of familiarity. I use brace
expansion *all the time*. It's very handy for manipulating groups of
files with similar names. So the expression
http://imgs.xkcd.com/clickdrag/{1..256}{n,s}{1..256}{e,w}.png
is just as readable to me as the expression
http://imgs.xkcd.com/clickdrag/$y$v$x$h.png
, but the latter also requires me to figure out where the variables
are coming from.
>> What is this "real world" of which you speak, and where may I
>> download it from? ;-)
>
> It's on the Internet. Just download the whole thing and grep it.
We're gonna need a bigger boat^W hard drive.
-- Ben
More information about the gnhlug-discuss
mailing list