Twilight Universe


I’m trying I swear!

Posted in blog by Gregory on the May 15th, 2007

Having just moved recently with my wife into a new apartment in downtown Oakland I have very spotty internet access. In fact we’re currently sharing my downstairs neighbors wireless which only hits one corner of the living room… with a 6 year old laptop…  so my plans for updating this site every day have taken a blow.

.. along with my emails, other updates, projects, and many other things. You never realize how hooked in you are until you don’t have net access. Sadly I can’t get cable here either… ah well.

Back to your regularly scheduled programming, I’ll fix this soon hopefully.

A Simple Unix Search & Replace

Posted in Articles by Gregory on the May 8th, 2007

For no apparent reason - I love working in the command line. It can’t do everything (no, really, it can’t) but it brings back memories of my old DOS days. The days I was still learning computers and drinking it all up like cold iced tea. The command line is so powerful and flexible, and because of that it can be frustrating.

For example - finding a simple string in a whole bunch of text files across multiple directories and then replacing that string in the text file. Tough to do simply in Windows normally, but I figured that, with the power of grep at my hands in Unix I could do a simple find and replace easily.

Not true, at least, not obviously true. The find part is easy, but the replace? It took me a lot of playing around to find out how to do it, amazingly it didn’t use grep (though it probably could). It fact it’s only one line of typing in the shell.

(more…)