I’m trying to use an array to store a list of file names using the find command.
For some reason the array fails to work in the bash used by the school, my program works on my own laptop though.
So I was wondering if there’s another way to do it, this is what i have:
array = (`find . -name "*.txt"`) #this will store all the .txt files into the array
Then I can access the array items and make a copies of all the files using the cat command.
Is there another way to do it without using an array?
You could use something like this:
For example, to make a copy: