igli 1208383528 learn To read filenames into an array from find use: while read -rd ''; do arr+=("$REPLY"); done < (find dir ... -print0) igli 1208383560 forget igli 1208383662 learn To read filenames into an array from find use: while read -rd ''; do arr+=("$REPLY"); done < <(find dir ... -print0) kerframil 1603520189 forget kerframil 1603520237 learn To read filenames into an array from find in bash >=4.4: mapfile -td '' arr < <(find dir -print0). In older versions of bash: arr=(); while read -rd ''; do arr+=("$REPLY"); done < <(find dir -print0). Note that -print0 is a non-standard option, albeit one that is commonly supported. monkfish 1733532504 forget monkfish 1733532509 learn To read filenames into an array from find in bash >=4.4: mapfile -td '' arr < <(find dir -print0). In older versions: arr=(); while read -rd ''; do arr+=("$REPLY"); done < <(find dir -print0). As of POSIX-1.2024, -print0 is a standard option.