DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Automating frequent tasks

Solving problems with your script

Even if your environment is set up correctly, any long script that you write will almost certainly fail to work correctly under some circumstances. This may be due to a failure to consider all the conditions under which the script may be run, or due to an oversight or syntax error in the script. The best way to get used to creating small to medium sized shell scripts is to do the following:

This method, known as bottom-up programming, is especially suited to small scripts (those which contain less than about fifty lines of commands). For longer programs, you may need to learn more about programming techniques. (See ``Learning the shells'' and ``Learning the C programming language'' for references to more advanced texts.)

Next topic: What to do if your shell script fails
Previous topic: Solving problems with the environment

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003