There is a fairly simple bash
script. The script displays the paths of all files and folders in the specified directory. It seems to display everything more or less correctly, but the last found file is always displayed with
Cannot open [No such file or directory]
currentPos=`pwd` while `read -rd $'\0' file`; do echo "$file" done < `find ${currentPos}/dir0`
Why and how to avoid it?