Bash Turn String Into Array Javascript Length Of Line