Bash Assign Output Of Function To Variable