What is a script?
A shell script is a computer program which is interpreted by an operating system shell.
Scipts are used to automate procedures that could be manually performed from the command line. They can potentially save a huge amount of time by eliminating repetitive commands. For example, if you're going to compile and test a program 100x, and each compilation and test cycle requires 25 steps (commands), you're looking at performing 2500 steps. It's much more efficient to create a script containing those 25 steps and run it as needed -- in fact, you can even set things up so those commands execute automatically as soon as you save a new version of your program.