1

problems with find | ls within a for statement

view story
linux-howto

http://www.unix.com – Hello, Code: for dir in `find /root/test -type d` ;do     echo "$dir" done for dir in `ls -1d /root/test/*/` ;do     echo "$dir" done If there's a directory with spaces in name, it does echo each word of that dir separately... solution? Code: mkdir "test" cd test mkdir "example_1_2_3" mkdir "example 1 2 3" Example results: Code: /root/test /root/test/example 1 2 3 /root/test/example1_2_3 (HowTos)