#!/bin/csh
# you need to quote the filenames with double quotes so that
# $x gets expanded, but doesn't get split at spaces
# and don't forget the g on the search replace, or it will
# only replace the first space
foreach x (`find . -print`)
mv "$x" `echo $x | sed -e 's/\s/ /g'`
end
On Tue, 15 Jul 2003, Brett Dietsch wrote:
quoted 36 lines On Tuesday, July 15, 2003, at 01:47 PM, Kurt Bernhard Pruenner wrote:
>
> On Tuesday, July 15, 2003, at 01:47 PM, Kurt Bernhard Pruenner wrote:
>
> > Brett Dietsch wrote:
> >> for i in `find . ` ; do echo "mv $i `echo $i | sed s/\s/_/` ; done
> >
> > Whoa - that's at least missing quotes around the "$i"...
>
> nah, you dont need a quote around throw-away variables. you may need a
> quote elsewhere though, like here:
>
> echo "$i | sed s/\s/_/"
>
> mind you, im too lazy to actually test any of this right now. with the
> above stuff, you'll probably get a lot of lines thinking that you mean
> to make each character separated by spaces a separate line, but hey..
> google.
>
> > But still - whitespace (at least spaces) sure aren't a problem on
> > Windows
> > partitions, so are you sure it'll help? (Replacing all whitespace with
> > an
> > underscore is going a bit to far, I'd say...)
>
> this is true. the only thing that'll bitch is dos, but why would you
> play mp3's in dos?
>
> but itunes wont care if you replace them, as long as you tell it not to
> organize the files. if you do, it'll rename them every time you import
> them.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: idm-unsubscribe@hyperreal.org
> For additional commands, e-mail: idm-help@hyperreal.org
>
kent williams -- kent@avalon.net
http://www.cornwarning.com -- Iowa's First Techno Record Label
http://www.mp3.com/chaircrusher -- tunes
---------------------------------------------------------------------
To unsubscribe, e-mail: idm-unsubscribe@hyperreal.org
For additional commands, e-mail: idm-help@hyperreal.org