find
tem o sinal -print0
para lidar com este problema:
#!/bin/bash
find . -print0 | while read -d $'$ ls
script.sh space name
$ ./script.sh
.
./script.sh
./space name
' file
do
echo ${file}
done
Exemplo:
#!/bin/bash
find . -print0 | while read -d $'$ ls
script.sh space name
$ ./script.sh
.
./script.sh
./space name
' file
do
echo ${file}
done