TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:18790] quick way to strip spaces...
Brian Ackermann wrote:
>
> I did what you suggested, in the first case, while I was waiting for your
> answer...I get this now....
>
> find: invalid predicate `(C&C Music Factory) Do you wanna Get Funky.mp3'
>
> > or this, if you want to avoid the confusing backquotes:
> >
> > for i in $(find -name *.mp3); do mv "$i" $(echo $i | sed s/\ /-/); done
Oops.. your shell probably expanded the *.mp3 to actually be all of the
MP3 files in your current directory.. More quotes are necessary..
for i in $(find -name "*.mp3"); do mv "$i" $(echo $i | sed s/\ /-/);
done
--
_ _ _ _ _ ___ _ _ _ ___ _ _ __ 90% of all statistics are
/ \/ \(_)| ' // ._\ / - \(_)/ ./| ' /(__ made up on the spot.
\_||_/|_||_|_\\___/ \_-_/|_|\__\|_|_\ __)
[ Mike Hicks | http://umn.edu/~hick0088/ | mailto:hick0088@tc.umn.edu ]