I know some very basic commands in Linux and am trying to write some scripts. I have written a function which evaluates the sum of last 2-digits in a 5-digit number. The fun
It is easy you need to echo the value you need to return and then capture it like below
demofunc(){ local variable="hellow" echo $variable } val=$(demofunc) echo $val