Any good programming languages provides support for functions.
Functions serve to group collections of commands that carry out an often required task.
Older versions of the Bourne shell did not. Calling shell programs When you create a shell program it is just another executable program on your disk. It is possible to run another shell program from within a shell program. When you call another shell program a new shell process will be forked and this new shell will have its own environment. On the other hand when a shell function is executed there is no new shell process created and so the shell function operates within the same environment as the rest of the current shell program.