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.

2 comments · Commenting is closed
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

A is A

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

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

By A is A on 19 August 2010 · 07:29