Because terrorism isn’t just about what scares you

Wednesday, 18 August 2010

Via http://gizmodo.com.

You are sooooo far out of your league… even posting an office notice.

Additionally, let’s turn this into a Perl post, shall we? I keep the images here organized, roughly, in dirs by initials. For example sedition-dot-soda.jpg is in img/s/d/s. Typing makedir 263 times wouldn’t be much fun. Yet that was the road I was on for awhile. Doing them as needed. Idiot me.

You wonder why some of us love Perl soooooo much? This is just one reason–

perl -le'for("a".."zzz"){$d=join"/",split"";`mkdir $d` unless -d $d; print $d}'

Update: And the improved version I should have done as suggested by Maximum Solo–

perl -le'for("a".."zzz"){$d=join"/",split""; mkdir $d and print $d}'

Furthermore, three exclamation points is appropriate only when being ax murdered. Srsly. Dnt mk me sho u.

digg stumbleupon del.icio.us reddit Fark Technorati Faves

Discussion

Comments


Maximum Solo

Re: Because terrorism isn’t just about what scares you

And what about launching 17576 times sh then mkdir? Save power! :-)
Do not use backquotes, use perl mkdir function directly. Then you can even omit the directory existence test:

perl -le'for("a".."zzz"){$d=join"/",split""; mkdir $d and print $d}'

By Maximum Solo on 19 August 2010 · 07:17
comment link · reply to this

Ashley

Re^2: Because terrorism isn’t just about what scares you

++. Better still. I forget about some of the built-ins.

By Ashley on 19 August 2010 · 07:29
comment link · reply to this

Your information (required) Name*
Email*
Website

* Indicates required fields; email is used for validation and is not displayed on the site.

Your comment
Commenting on Because terrorism isn’t just about what scares you
Title

Body is limited to ≈1,000 words. Paragraphs—but not line breaks—are automatically inserted. Valid XHTML is required. These are the allowed tags–

<a href=""></a> <br/> <acronym title=""></acronym> <abbr title=""></abbr> <code></code> <pre></pre> <tt></tt> <ins></ins> <del></del> <hr/> <cite></cite> <b></b> <i></i> <sup></sup> <sub></sub> <strong></strong> <em></em> <h1></h1> <h2></h2> <h3></h3> <q></q> <blockquote></blockquote>