The Solaris group is a forum where peers share technical expertise, solve problems, and discuss issues related to the Solaris operating system, including OS-related malfunctions, security issues, and network performance.

shell programming.

I have a small query. I have been working with different flavour of unix
,viz.: Sco open server,Solaris etc.
and i am aware of basic system admin commands and other things but one very
important aspect i have yet not touched is Shell programming.

I have done some basic C programming at graduation level but even that time
my skills on programning were not great. Now I want to learn shell
programmin so as to facilitate my System Admin requirements.

I want to know,is it impending upon me to learn C programming first in order
to learn shell or i can go straight away. Also kindly suggest some good
links on internet where i can find shell programming skill set material.

Popular White Paper On This Topic

Learning C is certainly not necessary for shell programming. The best thing
you can do is get a good book on Shell Scripting with lots of examples. I
regularly confuse the "if-then-else" syntax of the different shells I use,
because they are all different (why? Because they can be.) A quick look in
the reference book and I'm set (the man pages are not particularly helpful,
but also have the answers buried in them).

You will also learn, as you build more advanced shells, that there are
utilities that you can spend months learning as well - sed and awk come to
mind, as do regular expressions - and you will end up digging into them as
well.

I have a shelf full of reference books that I draw upon when shell
scripting, partially because shell scripting by its nature can use all the
features and functions of the operating system.

But you can start small - remember that a shell script is just a series of
commands that you can enter at a command line encapsulated in a file.

b) hunt down existing shell scripts and read through them to see what
they do.

c) copy existing scripts and start tinkering. Just make sure that if a
script does something to important production files, that your test
script not mess them up, but rather, make a small copy of the real data
to use as test data.

As for C programming vs. shell, the generalization is that shell
scripting is easier. But you should see some of the hairy shell code,
and you can realize the limitations of generalizing.