Bash Turn String Into Array Javascript Length