Re: PERL vs. Shell scripting for server automation.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Micah DesJardins
Date:  
To: Main PLUG discussion list
Subject: Re: PERL vs. Shell scripting for server automation.
Shell is ubiquitous, you won't run into a (*nix) server without it.
Perl is nearly so, but ymmv. I've done it both ways and I think the
Perl ended up being more readable (ironic?) and more potentially
maintainable by someone else. As long as you clearly document the
process, I'd imagine anything you want would work. Realistically, you
can't get it wrong, so I'd say do what works best for you in your
particular situation. If you want to do it in PHP by all means go to
it, the biggest issue with that has already been mentioned. Shell is
the most portable and probably the most cryptic. Perl is a close
second in portability but reasonably less cryptic if done right. Using
anything else means you'll have another tool chain to install on any
new servers you bring up or any servers you want to migrate that
backup process to.

On Wed, May 19, 2010 at 6:46 PM, Eric Shubert <> wrote:
> Good comments so far.
>
> Perl is a bit more powerful, meaning that you can do just about anything
> with it. It's also widely used for many things, and is C-ish in its syntax.
> So knowing perl is likely to give you more mileage personally.
>
> OTOH, bash is a bit simpler. When I've looked at doing the same thing in
> bash vs perl, the bash scripts tend to be a bit shorter and simpler (no
> files to open, etc). There is quite a lot you can do with bash once you
> learn what it's capable of.
>
> Given that your application is something that is done for the most part at
> the command line, I expect in this case that bash would be more suitable. I
> don't think that perl would buy you much of anything, and bash would
> probably be a little less coding.
>
> That's just my opinion though. ;)
>
> --
> -Eric 'shubes'
>
> keith smith wrote:
>>
>> Well Shell looks like Chinese to me.  I bet I can learn it as I have
>> learned a number of languages.  I think knowing what to do [with Linux]
>> might be more difficult than learning a language.  I did some PERL scripting
>> about 10 years ago.  Seems simple enough.
>>
>> Since it is half a dozen of one or 6 of the other, I'm wondering which
>> would give me more mileage since I am currently doing PHP?
>>
>> ------------------------
>> Keith Smith
>>
>> --- On *Wed, 5/19/10, James Finstrom /<>/*
>> wrote:
>>
>>
>>    From: James Finstrom <>
>>    Subject: Re: PERL vs. Shell scripting for server automation.
>>    To: "Main PLUG discussion list" <>
>>    Date: Wednesday, May 19, 2010, 6:11 PM
>>
>>    This is like asking bacon or gravy. It depends what flavor of fat you
>>    are :). Do you know either language? Which are you more fluent in
>>
>>    On 5/19/10, keith smith <
>>    </mc/compose?to=>> wrote:
>>     >
>>     > Hi Everyone,
>>     >
>>     > I was looking at some examples on writing a back up script and
>>    they are
>>     > written in shell script.
>>     >
>>     > Now I'm wondering what would be better PERL or Shell scripting
>>    for doing
>>     > stuff like writing a backup script that might stop MySql, make a
>> copy
>>     > (dump?) , tar it and maybe move the tarball or place it on
>>    another server?
>>     >
>>     > As you might have gathered from my last couple of questions I am
>>    not a sys
>>     > admin.  I'm a programmer and am responsible for several servers,
>>    so I guess
>>     > I need to break down and learn a few more skills.
>>     >
>>     > Thanks in advance for your insight, advice, and help!
>>     >
>>     > ------------------------
>>     >
>>     > Keith Smith
>>     >
>>     >
>>     >
>>
>>    --     Sent from my mobile device
>>
>>    James Finstrom
>>    Rhino Equipment Corp.
>>    http://rhinoequipment.com ~ http://postug.com
>>    Phone: 1-877-RHINO-T1 ~ FAX: +1 (480) 961-1826
>>    Twitter: http://twitter.com/rhinoequipment
>>    IP:
>>    </mc/compose?to=>
>>    ---------------------------------------------------
>>    PLUG-discuss mailing list -
>>    </mc/compose?to=>
>>    To subscribe, unsubscribe, or to change your mail settings:
>>    http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss