cd to folder with spaces - in a script

Jan te Beest (jteb) no-reply-gw at fcp.surfsite.org
Sat May 30 00:15:44 UTC 2009


Just

find . -type d | while read FOLDER; do cd "${FOLDER}";

I reckon ( don't really know the case )

I usually do something like this (might not be most efficient, but I like it for clarity.

# for i in $(find . -type d); do 
cd "${i}"; 
whatever you want to do in i; 
cd ..; 
done

Cheers,
Jan


-- 
This is an email sent via The Fedora Community Portal https://fcp.surfsite.org
https://fcp.surfsite.org/modules/newbb/viewtopic.php?post_id=347787&topic_id=71278&forum=10#forumpost347787
If you think, this is spam, please report this to webmaster at fcp.surfsite.org and/or blame jan at dutchsoftware.com.




More information about the fedora-list mailing list