Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 412 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 412 Bytes

Declare functions

    name () compound-command [ redirections ]
    #or
    function name [()] compound-command [ redirections ]

Variable Scope

    func1(){
        local var='func1 local'
        echo "In func1, var = '$var'"
        func2
    }

    func2(){
        echo "In func2, var = '$var'"
    }

    local var=global  
    func1

    echo "Global var = '$var'"