shell script assign function return value to variable