Bash Check If Array Contains String Javascript Substring