[OT] xkcd

Ben Scott dragonhawk at gmail.com
Thu Oct 11 23:37:48 EDT 2007


On 10/11/07, Mark E. Mallett <mem at mv.mv.com> wrote:
> mm  (I suppose we could just say xkcd.com/{`seq 1 327`})

  Doesn't work.  You need the comma a separator within {...}.  But even

	http://xkcd.com{`seq -s, 1 327`}

doesn't work, because the output of Command Substitution is not
reevaluated for more shell syntax.  You instead would need to generate
the supposed command line, and then use the eval builtin to have the
shell evaluate it again:

	eval http://xkcd.com/\{$(seq -s, 1 327)\}

Of course, if you're using bash, then

	http://xkcd.com/{1..327}

will do the job without all the messy syntax or the external program.

  How about that.  This thread is on-topic after all.  ;-)

-- Ben


More information about the gnhlug-discuss mailing list