I got sick of having to try to copy and make major modifications for each environment that I was in. As a consultant I sometimes have to deal with ridiculous policy driven constraints as to what software I can or cannot use. Sometimes it’s simply ignorance (like when the CTO of a company said that I could only script in a “…standard shell like BASH…” nothing obscure like KSH) but what ever the case it’s a pain when you’ve grown accustom to something as personal as your shell settings. Now I have a solution.
17
2009
7
2009
Shell tricks: eval helps make dynamic scripting rock.
If you write shell scripts of any significant size, eval is a very good command to understand (well). It can make some code simpler, other code obsolete, and yet other code it makes possible that would not be otherwise.
What is eval?
According to the 2004 IEEE Std. 1003.1:
eval constructs commands by concatenating arguments.
The example given on [...]
24
2009
why I don’t write BASH scripts
I’m constantly hounded by GNU/Linux newbies GNUbies about many things relative to scripting; Why don’t I use gawk for my awk scripts; Why don’t I use ‘[[’ instead of ‘[’ for my condition tests in shell scripts; Why don’t I use BASH for my shell scripts?. Such questions rarely come from seasoned UNIX professionals who have worked on multiple flavors of Unix. Explaining the way things work in the real world requires that the audience has an attention span beyond that of the averageI’m_pissed_at_society_and_microsoft_sucks-linux-neophyte.
12
2009
CAWKLib
CAWK (Cawk’s Another Web Kit) is a web framework written in AWK that is soon to be under development. When we started working on it we discovered that we needed a better way to manage file inclusions than the ‘-f’ command line option. We decided to write our own pre-processor and package it with the custom libraries that we were developing.
27
2009
Adventures in Lua (I)
After studying and working with Lua for about a year now, I find it to be a very powerful and innovative language. While the syntax is not my favorite, overall it’s fun to work with. Recently I started using the standalone lua interpreter for some general purpose scripting which has revealed to me a few key reasons that Lua (the language) or at least lua (the interpreter) won’t be readily employed for system scripting on a large scale anytime soon.