What scripting do you use for basic server maintenance kinds of tasks, e.g. backups, moving files around, etc.? Do you stick to bash, ruby, perl, something else, or do you mix-and-match for different needs? What are the strengths and weaknesses of your choice(s)?

I'm personally interested in *nix servers, but maybe the question could be relevant to Windows servers as well.

  • 2
    Use the one that you like and lets you get the job done quickly. Voting to close this as a poll (aka, not a real question), there can't be a single correct answer to this. – Tim Post Jul 16 '10 at 16:02
  • 2
    This should be a community wiki question or be closed. – Ben Hoffman Jul 16 '10 at 16:59

I can usually do my maintenance with trivial bash/ksh(depending on server) scripts. When I need any kind of logic or something that gets sorta tricky in such a shell though, I prefer using Ruby. Probably my favorite feature of Ruby for this is how easy it is to execute an external command

directories=`ls -l`

BASH is probably going to your most universally installed on most *nix systems today.

PERL is for intense text parsing, probably not the best for basic server admin stuff.

RUBY or PHP for server admin? That's a new idea.

Some of the tools you'll also want to arm yourself with are AWK and SED. They'll make parsing stuff a little easier.

Good Luck.


I use the Bourne shell for portability, Bash for its greater power than sh (arrays, etc.), ksh when Bash is not available and Python when I need speed and greater power than Bash.

I do also use full-fledged AWK scripts (in addition to snippets in shell scripts) for field and record manipulation. And I like to push the envelope with sed sometimes. It's Turing complete, but its scripts are a bear to read after some time has elapsed.


no love for python in your little list there I see? its a very versatile language for both scripting and server admin in the right hands. here's something to get you started if your interested

Not the answer you're looking for? Browse other questions tagged or ask your own question.