Bash Assign Function Return Value To Variable Frequency