1842716 Members
2602 Online
110208 Solutions
New Discussion

What language to learn?

 
SOLVED
Go to solution
Ted Flanders
Frequent Advisor

What language to learn?

I am a fairly new Unix Administrator. I would like to know what language (s) I should learn. I have no programming experience. I run a HP9000 K220 box, using HPUX.
I have a book to learn "basic" programming. I also have "Learning Perl" and "Visual C++". Once again, I hate to spend a lot of time learning something that I wont use that much. So this is where you people come in. What will I need to know to be a succesful Unix Administrator? Thanks for your help
11 REPLIES 11
Berlene Herren
Honored Contributor

Re: What language to learn?

Posix shell and C is my recommendation for HP-UX.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
Bruce Regittko_1
Esteemed Contributor

Re: What language to learn?

Hi,

I would recommend Korn/Posix shell scripting first if you are going to be doing system administration. A basic familiarity will save your bacon when you need to make a minor adjustment to a configuration script.

Once you are proficient in shell scripting, I would suggest Perl. You can do much more with Perl than you can with shell scripting.

As for C, I would hold off on this until last. It is the language that is the most powerful but the one that the typical sys. admin. uses the least. It will also be the most difficult to learn, especially if you have no prior programming experience.

--Bruce
www.stratech.com/training
Blake Garretson
Advisor

Re: What language to learn?

If you just learn the Posix Shell (the standard /bin/sh for HP-UX) and some of the standard tools like sed and awk, you'll be able to write most of the scripts/programs you need. There may be a few cases where C may be the better choice. One example that I've run into is where you need to read a very large data file (the Posix shell is too slow.)

However, instead of C, if you just want to get something done QUICKLY, try Python. I've been using it lately because I can do complicated things that I might usually need C/C++ for, but it eliminates hassles like memory managment and declaring variables. Look at www.python.org and/or get the depot from the HP-UX Porting Archive.
Alan Riggs
Honored Contributor

Re: What language to learn?

Other languages might be beneficial for "getting the job done quickly and easily", and I strongly support th recommendations to learn posix/ksh and at least a bit of awk/sed/perl, but nothing will give you a better understanding of how Unix is put together than good, old C.
Rodney Hills
Honored Contributor

Re: What language to learn?

Although posix Shell is good to know, the real work horse for system administration is PERL.

I have been using it for a few years and I have been able to automate tasks in 10 lines of PERL, which would take 40 lines of posix shell.

It's also more fun :)
There be dragons...
Stefan Farrelly
Honored Contributor

Re: What language to learn?


Shell scripting is still the most widely used languge for Sys Admin. The current inter-Unix platform version is Posix shell but there is still a lot of Korn shell or Borne shell scripts out there. If however, your job entails looking after web servers based on Unix then you need good Perl knowledge as well as this is what they use for their admin, as well as CGI scripts.

I dont agree with others' comments here that Perl is widely used for regular non-web sys admin - Shell scripts are still the workhorse language. New software arriving for our servers still all use shell scripts for installation and support, not Perl.

Perl is slowly becoming more widely used, but its doubtful it will replace shell scripts in the future, it will probably just become equally as widely used.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Dan Hetzel
Honored Contributor

Re: What language to learn?

Hi Ted,

I fully agree with Stefan, Posix Shell is the language you should start with, especially if you have no programming experience.

Perl is surely useful to know, but not as widely used. It is a lot more powerful, but has a steeper learning curve, especially without some 'decent' programming background.

As a Unix admin, you'll have to face shell scripting quite often, you can't really live without it.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Ted Flanders
Frequent Advisor

Re: What language to learn?

Can you give me the title of a couple of books that are good for teaching shell scripting? Remember that I am a begginer at this. I will assign points to everyone as soon as the forum lets me! Thanks
Dan Hetzel
Honored Contributor
Solution

Re: What language to learn?

Hi Ted,

"SAMS Teach yourself shell programming in 24 hours" would be a good start.
Available at 'amazon.com' at the following link:
http://www.amazon.com/exec/obidos/ASIN/0672314819/qid=979566753/sr=2-1/ref=sc_b_1/107-1993816-9878134

Or "Unix Shell Programming (Hayden Books)"
http://www.amazon.com/exec/obidos/ASIN/067248448X/qid=979566893/sr=1-16/ref=sc_b_16/107-1993816-9878134

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
James R. Ferguson
Acclaimed Contributor

Re: What language to learn?

Hi Ted:

I would certainly start by learning Posix shell. You will find that you will use this almost everyday, even to compose tiny throw-away command-line shell scripts to automate your work and avoid repetition.

A through knowledge of the Posix shell will allow you to the read scripts that comprise the standard HP-UX environment. Being able to do this will allow you to better understand configuration options, startup and shutdown, and to debug common problems -- all things that will augment your system administration abilities.

The Posix shell will expose you to a good mixture of programming concepts including events, arrays and functions upon which you can build your skills and understanding with in more sophisticated languages like C later.

You can certainly add sed and awk as great 'add-on' tools to Shell scripting and then C as you see fit.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: What language to learn?

Hi Ted (again):

Here's a couple of links to several references and "favorites" for learning shell programming:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xbb5e7e990647d4118fee0090279cd0f9,00.html

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xb75e7e990647d4118fee0090279cd0f9,00.html

Happy scripting!

...JRF...