keyword

Bash function keyword

Bash-specific alternative function definition syntax; the function is called by name without parentheses.

Formal Syntax & Structure

bash syntaxbash
function name { commands; }

Return Value

exit status

Bash-specific alternative function definition syntax; the function is called by name without parentheses.

Working Example

Example Snippetbash
function report { printf '%s\n' report; }type -t reportreport
Bash Reference