User forbade pointed out this great guide from the Linux Documentation Project:Advanced BASH scripting (pdf)
It is also available in other formats. DOWNLOAD PDF
Speaking of BASH scripting, my favorite BASH book is published by O'Reilly, Learning the BASH shell. It covers a lot of basics and command line use in addition to programming.
Also, when I am writing a serious production script, I often start with new_script, a shell script that creates a solid template as a starting point. You can download new_script from the LinuxCommand.org script library.