In this module you have read about several methods for completing a programming project.
Each method or tool is best used for a particular circumstance. It is up to you to determine which tool to use based on the problem
you need to solve. Below are some guidelines to consider when deciding if a shell script or another tool is the right way to solve a problem.
- Does the program need to be able to run on a variety of systems, some of which may have a minimal installation or not yet have all programs configured?
A shell script is the best solution.
- Is it important that the program run quickly because it is complex or runs repeatedly? A compiled language such as C is best.
- Do you already have parts of the program functionality available in one language? Consider using the same language to finish the project or, if necessary because of the program's design, use another language for some parts of the project after determining how difficult it will be to interface between the two languages used for the project.
- Is the task at hand something that could be done from a UNIX command line but needs to be automated?
A shell script is probably the appropriate tool.
- Do you require a graphical interface for the project? Use a tcl or Python script, or a compiled language with additional graphical tools.
- Do you need to complete the project quickly?
A shell script may be the best solution, or another scripting language if a shell script does not include all the functionality you need.
- Does the project involve networking or low-level computation? A compiled language like C is probably best; extensions to Perl and Python can do most of these tasks but are less efficient than a compiled language.
As you can see, the considerations are as numerous as the tools.
Shell scripts are the best tool for the job in some cases; in others, they just are not up to the task.