Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux function return

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

result=$(myfunc)   # or result=`myfunc`
echo $result
Source by www.linuxjournal.com #
 
PREVIOUS NEXT
Tagged: #linux #function #return
ADD COMMENT
Topic
Name
3+1 =