Bash Split First Occurrence Leetcode Javascript 30