Shell Functions

sh_init The C shell has aliases (). But until System V Release 2, the Bourne Shell had almost () no way for users to set up their own built-in commands. Functions are like aliases, but better. For instance, functions can return a status () and have much more reasonable syntax (). bash and the Korn Shell have shell functions, too. To find out all about functions, check a shell developing tutorial. There are examples in the sh_init file on the tutorial. Here are the examples from articles and changed into Bourne shell aliases:

That example shows how to write a function with more than one line. In that style, with the ending curly brace on its own line, you don't need a semicolon after the last command.

- JP