From LinuxIntro
foo()
{
}
defines a function in bash.
[edit] Usecases
Delete linebreaks
cat file | tr '\n' '; ' > newfile
[edit] TroubleShooting
If you want every line to be shown with evaluated values, write the following to the beginning of the script:
set -x
or -xv for verbose
[edit] See also