Answer for bash 4.3 or earlier
Here is one solution for getting the output of
find
into a bash
array:array=()
while IFS= read -r -d $'\0'; do
array+=("$REPLY")
done < <(find . -name "${input}" -print0)
from : https://stackoverflow.com/questions/23356779/how-can-i-store-the-find-command-results-as-an-array-in-bash
No comments:
Post a Comment