Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
If your shell script is just a driver for a bunch of other programs which run pretty much in order with fairly static sets of command-line options, then it can be fairly long without being an issue at all.

Right; many scripts start life exactly like that. For example, "check out some files, run make, check condition X and scp files to server Y, update config file Z...". Many lines of the script are simply using external programs like cvs, scp, mysqldump, whatever. If it's just a page full of lines like that, I wouldn't want a long sequence of system calls in a Perl script.

But as time goes by, users want more and more little bits added here and there, and even though it's still primarily a "driver for a bunch of other programs", now it's starting to do a little more error checking, more branching, and repeated bits are put into functions.

This is primarily the case I'm asking about here. When it's a sort of gray area, and you know you could just dig in and update the shell script, but you also know that it really won't fix the more inherent problems that a rewrite in Perl would. Also you want less work for yourself the next time you get a feature request for said script.


In reply to Re^2: At what point do you rewrite that old shell script in Perl? by rudder
in thread At what point do you rewrite that old shell script in Perl? by rudder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-26 05:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found