Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Larry Bertolini <bertolini dot 1 at osu dot edu>
Subject: Re: Sybperl Vs Shell Scripts
Date: Mar 28 2002 3:18PM


Before I "converted" to Sybperl, I was going the isql/shell script route.

I did a bunch of stuff like:
   * use awk to general sql
   * execute isql, direct stdout to file
   * use awk to parse output, determine what to do next,
     generate sql
   * lather, rinse, repeat

(I used awk, but I could have used perl, C, or whatever...)

To me, the biggest advantages of Sybperl were:
    * fewer iterations of connect/disconnect.  Over the
      course of a night's processing, my shell scripts
      were making over 1000 connections; not very efficient,
      and a drag because we audit connections.

    * When you generate a batch of sql (using awk, perl, or
      whatever) and use isql to execute it, the whole file
      of sql gets executed before you get to see the results.
      So, it's problematic to implement the following logic:
      * run sql to check on status of something
      * based on the result, do "something" or "something else"

      You can do it with shell scripts, but if the logic
      is complex, it's a pain.

    * IMO, as a programming language, perl is better than sh/ksh/csh.

However, if you can't get Sybperl to build, your question
sort of answers itself.

At 09:26 AM 3/28/2002 -0500, you wrote:
>I am looking for some inputs from you in order to present some facts about
>the capabilities of sybperl which are lacking in shell scripts and also I
>need to make a compelling argument to use perl instead of shell scripts.
>Can anyone help me get this info or point me to some place where I cam find
>some info so I can get some information. The questions I am looking to get
>answered are :
>Why should we use perl instead of shell scripts??
>What features perl/sybperl offers that are not in shell scripts?
>How is perl beneficial as compared to shell scripts??
>Thanks for you time and help in advance...