function_name() {
statement
}
call function
function_name
Parameter
function_name() {
var=$1
var2=$2
}
call function
function_name arg1 arg2
Return value (1)
function_name() {
statement
return 2
}
call function
echo "Return is: $?"
Return value (2)
function_name() {
statement
return $RET
}
call function
echo "Return is:
$RET"
Thank you for this information :)
ReplyDelete