It is amazing how such a simple concept is so difficult to code. I have tried many ways of processing each file with in a directory tree, but each way leads me to a massive problem. I know there must be a simple command or loop to do this. There are many threads here, but none seem to answer the question:
How do I read the entire contents of a subfolder tree into an array. /home/user1 would consist of:
home.txt
folder1
test.txt
folder2
test2.txt
file2.org
The array should read the entire listing just as dir would generate and dump it into the array, then take each folder and generate another object list, dumping it into an array, and so on...
Is there not a simple command for doing this? Currently, I have a lot of code and much more to generate.
Please advise,
Simon