I have some folders with \n character it their names.
for example:
$ ls
''$'\n''Test'
Thats refer to a folder with Test name and a empty line before its name.
So when I run some scripts like this, in its parent directory:
while IFS= read -r d; do
rmdir $d
done < <(find * -type d)
It shows:
rmdir: failed to remove '': No such file or directory
rmdir: failed to remove 'Test': No such file or directory
Because it runs twice, once on \n and the another on Test, because the folder name has two lines.
So how can I solve this issue such that, script knows \nTest is just one folder?