: Which scripting language for server maintenance? 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,
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.
More posts by @Pope3001725
4 Comments
Sorted by latest first Latest Oldest Best
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
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.
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 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`
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.