I use scripts a lot to make my life easier. When a script starts with #!/bin/sh it tells Solaris to run the script...
in a bourne shell. When you put #!/bin/sh -xv as the first line, the shell echos each command to standard output along with the results of executing that command. This works with Korn and Bash shells as well, and makes debugging scripts a much simpler process.
Dig Deeper on Secure software development