shell script store function return value