BashFunctions

Syntax

  • Define a function with the function keyword:

    function f {
    

    }

  • Define a function with ():

    f(){
    

    }

  • Define a function with both the function keyword and ():

    function f(){
    

    }

Related Examples

A function that accepts named parameters