Bash Function Return Value To Variable Cost