Bash Function Return Value To Variable Speed