Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Which scripting language for UNIX?

Re: Which scripting language for UNIX?

From: Doug O'Leary <dkoleary_at_cb945623-c.rmvll1.il.home.com>
Date: Thu, 16 Aug 2001 16:06:39 GMT
Message-ID: <hcSe7.1249$6K5.223150171@news.randori.com>


Chris Boyle <cboyle_at_no.spam.hargray.com> wrote:
> In the quest to enhance my skill set I believe I need to learn at least one
> Unix shell scripting language. What I would like to know is, which shell is
> most popular for use with Oracle? Bourne, Korn etc. I remember from school

Perl and Python are good things to learn; however, the drawback with learning those to the exclusion of ksh or sh is that they don't come with any major vendors UNIX platform by default. They have to be downloaded  and installed. While that's not a problem for most sites or sysadmins, you will run into places that have a phobia against free-ware software.

Between ksh and (posix) sh, I choose ksh every time because of the easier and cleaner syntax. If I posted this in a UNIX newsgroup, that would have just started a flame war. The difference between posix and ksh is slight, but when you've been scripting with a specific syntax for years, those differences are annoying.

Forget about csh. You can write scripts using csh; but, they tend to be larger, slower, and much more of a kludge than anything in either posix sh or ksh.

You can probably skip the Bourne sh as well; it's much more primitive than ksh or Posix - that's the primary reason they came up with the Posix sh anyway.

Most things that you can do in perl you can do with ksh, although perl tends to be much cleaner and more elegant. The exception to that is network apps. Oracle scripts in ksh tend to be creating a sql command file, then running sqlplus using that file. You can't tie directly into the database like you can using perl or python.

My suggestion, if you're looking for scripting language sylabus is as follows:

  1. ksh (leanring ksh, O'Reillys); teaches you the command structure
  2. sed & awk (O'Reilys): will really open up UNIX scripting for you
  3. perl (Learning perl & Perl cookbook) basically, sed and awk on steroids. Another description for perl is "interpreted C". If you know C, learning perl will be a snap.

HTH; Doug

-- 
------------------------
Douglas K. O'Leary
Senior System Administrator
dkoleary_at_mediaone.net
Received on Thu Aug 16 2001 - 11:06:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US