Need to process files in current directory one at a time. I am looking for a way to take the output of ls or find and store the resulting value as elements of an array. This way I can manipulate the array elements as needed.
Need to process files in current directory one at a time. I am looking
Share
To answer your exact question, use the following:
Example
However, if you just want to process files one at a time, you can either use
find‘s-execoption if the script is somewhat simple, or you can do a loop over what find returns like so: