Returning values

myfunc() {
    local myresult='some value'
    echo $myresult
}
result="$(myfunc)"
Comments