You can build shell scripts in a variety of languages. One common method of building shell scripts is using what's known as "Bash Scripting" - you can learn more about Bash on Wikipedia at: http://en.wikipedia.org/wiki/Bash. There are some links to websites that teach Bash Scripting at the bottom of the page.
Another common language used for building shell scripts is Perl. You can usually find a book on Perl at a local library, but you can find links to some online tutorials on the bottom of the Wikipedia article on Perl: http://en.wikipedia.org/wiki/Perl