Programming Language for Systems Administrator

Sizer sizer at nospam.com
Mon Apr 11 19:07:06 EDT 2005


"Kanthi Kiran Narisetti" <TechAlerts at gmail.com> wrote in 
news:1113253691.821235.9750 at o13g2000cwo.googlegroups.com:

> I am Windows Systems Administrator(planning to migrate to Linux
> administration in near future), I have occassionally written few batch
> files and Vbscripts to automate my tasks.
> 
> Now I have strong interest to learn a programming language that would
> help me to write Scripts or Application ( In Systems Administrative
> point of view) .
> [...]
> I am confused to chose between C++,Python,Perl.

I admin both Windows and Linux (Slackware, Debian) boxes, and I think 
your best choice is either Python or learning bash scripting. C++ is just 
no good - I use it for some large applications, but for sysadmin and 
utility stuff it just takes 10 times as much work to get anything done as 
Python does.

bash scripting is still the way most people seem to do these things on 
linux (it's equivalent to batch files under Windows/DOS but far more 
powerful), which is the reason I suggest you take a look at it - it's 
still useful for writing small things that you want to send to other 
people where you don't know if they have python installed. Of course this 
is made less useful for you because you need to install a bash 
interpreter on Windows so it's no longer cross platform.

I suggest you learn Python instead of Perl. Perl and Python are close 
enough in terms of functionality (with a little give and take, please no 
holy wars), so I wouldn't say one is Better than the other if you already 
know it. But for someone starting from scratch I think you will find that 
while the perl program may be smaller the python program will be far more 
readable, maintainable, and easier to write.

I use bash scripting for small stuff (just simple command lines in 
sequence), C++ and Java for a few things that require it (though I really 
hate them both after using Python) and Python whenever I can. Python on 
Linux/Windows is amazingly cross platform as long as you use functions 
like os.path.join('dir','file') instead of hardcoding 'dir\\file' into 
your code.  And use the glob, shutil, and os libraries to do all your 
hard work for you.



More information about the Python-list mailing list