Running the script through shellcheck.net I was told that the " output forcycle is findfragile." Fair enough, file names with spaces are always complicated.
Suggested replacement code (one of them anyway):
while IFS= read -r -d '' file
do
done < <(find . -name '*' -print0)
I am familiar with the operator <, which is used to enter text from a file into a command, and, obviously, the results from findare fed into a loop. Therefore, when I first saw this, I thought that he was the victim of some formatting problems and tried to "clear" the last line. But removing the space between < <led to syntax errors, like adding one in <(.
So what does the design < <(cmd)do? Sorry if this is a simple or redundant question, it is not easy to find these things!
source
share