Re: cd to folder with spaces - in a script

2009-05-24 Thread Javier Barroso
On Sun, May 24, 2009 at 9:54 AM, Michael Casey wrote: > I used it for this: > > http://pastebin.ca/1432758 > > generating m3u files for each subfolder too > You don't need the initial '$' in $(cd "$FOLDERNAME"; find . -maxdepth 1 -name "*.mp3" -type f > "Playlist_${PWD##*/}".m3u;) The usual use o

Re: cd to folder with spaces - in a script

2009-05-24 Thread Michael Casey
I used it for this: http://pastebin.ca/1432758 generating m3u files for each subfolder too

Re: cd to folder with spaces - in a script

2009-05-21 Thread Javier Barroso
On Thu, May 21, 2009 at 8:51 PM, Tzafrir Cohen wrote: > On Thu, May 21, 2009 at 08:34:48PM +0200, Michael Casey wrote: >> yeah, SOLVED: :)) >> >> clear; find . -type d | while read FOLDERNAME; do $(cd "$FOLDERNAME"); done > > I'm not sure what it is exactly that you try to do, but: > >  $(cd "$FOL

Re: cd to folder with spaces - in a script

2009-05-21 Thread Javier Barroso
On Thu, May 21, 2009 at 8:34 PM, Michael Casey wrote: > yeah, SOLVED: :)) > > clear; find . -type d | while read FOLDERNAME; do $(cd "$FOLDERNAME"); done If you want set variables and using it later, I recommend you another method: while read FOLDERNAME; do $(cd "$FOLDERNAME"); done < <(find . -ty

Re: cd to folder with spaces - in a script

2009-05-21 Thread Tzafrir Cohen
On Thu, May 21, 2009 at 08:34:48PM +0200, Michael Casey wrote: > yeah, SOLVED: :)) > > clear; find . -type d | while read FOLDERNAME; do $(cd "$FOLDERNAME"); done I'm not sure what it is exactly that you try to do, but: $(cd "$FOLDERNAME") chdir-s into that directory in a subshell and then re

Re: cd to folder with spaces - in a script

2009-05-21 Thread Michael Casey
yeah, SOLVED: :)) clear; find . -type d | while read FOLDERNAME; do $(cd "$FOLDERNAME"); done Thank you!!

Re: cd to folder with spaces - in a script

2009-05-21 Thread Eduardo M KALINOWSKI
On Qui, 21 Mai 2009, 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 cant just add the "\" like: f