Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

closed as not constructive by Tim Post, Ben Hoffman, Rebecca Chernoff, JasonBirch, Kinopiko Jul 17 '10 at 1:16

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

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
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`
share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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