A quick comprehensive bash scripting guide to teach you the basics.
http://linuxconfig.org/Bash_scripting_Tutorial