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
On Fri, May 22, 2009 at 10:09 PM, Steven W. Orr wrote:
>
> ii=0
> while read -d $'\000' FOLDERNAME
> do
> savd=$PWD
> cd "$FOLDERNAME"
> ii=$((ii+1))
> cd "$savd"
> done <(find . -type d -print0)
This is all cool, as long as you don't want user input in the middle
of that loop, using
I used it for this:
http://pastebin.ca/1432758
generating m3u files for each subfolder too
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Patrick O'Callaghan wrote:
On Thu, 2009-05-21 at 19:40 +0200, Michael Casey wrote:
How can I cd into a dir, when it contains spaces, and I need to use it
in a script?
the directory:
/home/user/this is a folder/something
normally I would use:
cd /home/user/this\ is\ a\ folder/something/
but in
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thursday, May 21st 2009 at 13:40 -, quoth Michael Casey:
=>How can I cd into a dir, when it contains spaces, and I need to use it in a
=>script?
=>
=>the directory:
=>/home/user/this is a folder/something
=>
=>normally I would use:
=>cd /home/
Peter Langfelder wrote:
> Had the exact same problem, using cd "$FOLDER", i.e., adding the
> double quotes around the $FOLDER, solved it for me.
that can do it, and you can use age old '?' for spaces and special chars.
--
peace out.
tc,hago.
g
.
in a free world without fences, who nee
yeah, SOLVED: :))
clear; find . -type d | while read FOLDERNAME; do $(cd "$FOLDERNAME"); done
Thank you!!
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidel
On Thu, 2009-05-21 at 19:40 +0200, Michael Casey wrote:
> How can I cd into a dir, when it contains spaces, and I need to use it
> in a script?
>
> the directory:
> /home/user/this is a folder/something
>
> normally I would use:
> cd /home/user/this\ is\ a\ folder/something/
>
> but in a script
On Thu, May 21, 2009 at 10:40 AM, Michael Casey
wrote:
> How can I cd into a dir, when it contains spaces, and I need to use it in a
> script?
>
> the directory:
> /home/user/this is a folder/something
>
> normally I would use:
> cd /home/user/this\ is\ a\ folder/something/
>
> but in a script I c
How can I cd into a dir, when it contains spaces, and I need to use it in a
script?
the directory:
/home/user/this is a folder/something
normally I would use:
cd /home/user/this\ is\ a\ folder/something/
but in a script I cant just add the "\"
like:
find . -type d | while read FOLDER; do cd $FO
10 matches
Mail list logo