Linux Bash Script Function Return Value Javascript