15.1. Introduction

 <  Day Day Up  >  

Programmers often spend more time debugging programs than writing them. Because many shell programs perform tasks that can affect the entire operating system, making sure those scripts perform properly is imperative. Whether you are a user or a system administrator writing scripts to automate simple or complex tasks, you want your script to do what you want it to do, and not cause weird and unexpected surprises even after all the syntax errors have been weeded out. The expression "If it ain't broke, don't fix it" is often ignored when you are thinking of ways to "improve" a script that is already working. Perhaps you think your script should be a little more user-friendly, might need some cosmetic surgery, or a little more error checking. Or you might even be cleaning up some other programmer's code. So, you put the script back in the editor, type, type, type, exit the editor, and run the program. Whoops! It's broken! @<!@%5#!>!! This chapter aims to provide an invaluable tool for finding, fixing, and understanding many types of errors that cause shell scripts to misbehave and leave you frustrated, wasting a lot of time that you probably don't have.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net