3 ms·
"read" also supports the empty string to mean the null byte in this case: find ... -print0 | while read -d '' f; do ...; done And since Bash 4.4, also "re
by bewuethr 6y ago
"read" also supports the empty string to mean the null byte in this case:
find ... -print0 | while read -d '' f; do ...; done
And since Bash 4.4, also "readarray"/"mapfile" can specify a delimiter, which is great to read files safely into an array:
readarray -d '' -a arr < <(find ... -print0)