[conspire] Slice of life

Rick Moen rick at linuxmafia.com
Fri Sep 18 16:49:17 PDT 2009


Quoting Carl Myers (cmyers at cmyers.org):

> On an unrelated note, I also liked your mention of the advantage of
> scripting over crappy GUI tools - what an exquisite example to use
> when someone asks "Why should I bother to learn this crap anyways when
> I can just use a GUI?".  The more I use the CLI, the more comfortable
> I get with it and the more productive it makes me.

Sadly, this is a case where even my beloved vim can be The Wrong Thing.

o  When I found myself making a change across two zonefiles, I resisted
   getting really good with sed, awk, and grep.

o  When I found myself making a change across a dozen zonefiles, I _still_
   resisted getting really good with sed, awk, and grep.

o  But when I suddenly found myself having to make a change across 200
   zonefiles, _then_ I decided it was time to get really good with sed,
   awk, and grep.  ;->


Manual editing seems like a great idea until you start adding zeroes to
the number of files to edit.  And, even if you edit all 200 files
flawlessly, how about the backout procedure?  And how do you get other
people to review the main and backout procedures in advance?

A backout procedure on 200 files consisting of however many lines of sed
and awk runs in milliseconds, whereas doing the same fix using "vi *" or
whatever takes ages -- time you don't want to spend when the production
DNS is broken.

Automated editing / searching / filtering is not just utterly cool but
also necessary to quality and timeliness of work.





More information about the conspire mailing list