This book is a very popular and thorough reference for shell scripting.
Robbins, Arnold, and Nelson H.F. Beebe. Classic Shell Scripting. 1st ed. Sebastopol, CA: O’Reilly, 2005.
These two books contain many examples of useful and interesting shell scripts. The first is a bit more general and introductory; the second is targeted at somewhat advanced bash scripters.
Johnson, Chris F.A. Shell Scripting Recipes: A Problem-Solution Approach. 1st ed. Berkeley, CA: Apress, 2005.
Taylor, Dave. Wicked Cool Shell Scripts. 1st ed. San Francisco, CA: No Starch Press, 2004.
This definitive reference for the Korn shell includes Korn shell scripting.
Bolsky, Morris I., and David G. Korn. The New Korn Shell, Command and Programming Language. 2nd ed. Englewood Cliffs, NJ: Prentice Hall, 1995.