Re: cd to folder with spaces - in a script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx and/or blame jan@xxxxxxxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux