Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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
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. –  RandomBen Jul 16 '10 at 16:59
add comment

closed as not constructive by Tim Post, RandomBen, 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.

4 Answers

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
add comment

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
add comment

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
add comment

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
add comment

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