How to write functions in Bash

When you[he]#039[/he]re programming, you[he]#039[/he]re literally defining a procedure, or a routine, you want the computer to perform. A simple analogy compares computer programming to baking bread: you list ingredients once to set up the work environment, then you list the steps you must take to end up with a loaf of bread.

Source: LXer – How to write functions in Bash