OT (sort of) learning material suggestions:
I'll second the suggestion to pick up a book as reference material. Personally, I really liked
Sams Teach Yourself Shell Programming in 24 Hours (2nd Edition) by Sriranga Veeraraghavan. (I'd write a review on it, but someone at work stole it and I haven't read it in a couple years...)
Also, check out the
Advanced Bash-Scripting Guide from TLDP. Just keep in mind that sh != bash, exactly.