Introduction to Shell Script Programming
Chapter 6: Introduction to Shell Script Programming Guide To UNIX Using Linux Third Edition.