Shell scripts for GRASS

Where can I find information on how to write
shell scripts to run on GRASS ?

Examples: grass.logo.sh

  (1) scripts that are already in grass
  (2) other scripts on the system (eg /etc/rc*)
  (3) any good how-to-use-UNIX book

The most common sort of shell script I use just consists of lots of grass
commands one after another ......

phil