For CGI programming, there are a couple of extra variables to be aware of, and a few tips
I've picked up along the way.
Although the shell may not seem the obvious choice for CGI programming, it is quick to write and simple to debug. As such, it makes for an ideal prototyping language for CGI scripts, and fine for simple or little-used CGI scripts permanently.
See also the Article I wrote about ShellShock.
My Shell Scripting books, available in Paperback and eBook formats. This tutorial is more of a general introduction to Shell Scripting, the longer Shell Scripting: Expert Recipes for Linux, Bash and more book covers every aspect of Bash in detail.
Shell Scripting Tutorial is this tutorial, in 88-page Paperback and eBook formats. Convenient to read on the go, and in paperback format good to keep by your desk as an ever-present companion.
Also available in PDF form from Gumroad:Get this tutorial as a PDF
Shell Scripting: Expert Recipes for Linux, Bash and more is my 564-page book on Shell Scripting. The first half covers all of the features of the shell in every detail; the second half has real-world shell scripts, organised by topic, along with detailed discussion of each script.