So far in our explorations of bash scripting, we have seen how we can use any usual command line statement in a script, and how we can make use of variables. But up until now, our scripts had a very predictable order - they started at the first line, then executed every line sequentially until we came to the end of the file. Sometimes it's nice to be able to branch to different commands if some condition occurs, or do one step many many times, without having to type in each time. This concept is known as "Flow Control". There are tools in every language I know of that allow the code to deviate from a purely sequential order. And in every language as well, these are called "IF Statements" (also may be known as "Conditional Operators"), and "Loops".
Today we'll tackle these in a basic manner. But don't underestimate the power of flow control, young Jedi, for it takes many forms, and can be used for good AND evil.