For example if execute in nodejs child process something like:
exec("find /path/to/directory/ -name '*.txt'", callback);
How can i parse the streamed output in my callback function to an array to get something like so?
['file-1.txt', 'file-2.txt', 'file-3.txt', ...]
The current output is like following:
path/to/file-1.txt
path/to/file-2.txt
path/to/file-3.txt
Thanks for helping
path/to/file1.txtpath/to/file1.txtpath/to/file1.txt<br/>path/to/file2.txt<br/>path/to/file3.txt