TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:18790] quick way to strip spaces...



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'

  
> 
> Hmm.. I see that I missed a backquote...  Maybe this would work:
> 
> for i in `find -name *.mp3`; do mv "$i" `echo $i | sed s/\ /-/`; done
> 
> or this, if you want to avoid the confusing backquotes:
> 
> for i in $(find -name *.mp3); do mv "$i" $(echo $i | sed s/\ /-/); done
> 
> -- 
> _  _  _  _ _  ___    _ _  _  ___ _ _  __   Don't panic, don't
> / \/ \(_)| ' // ._\  / - \(_)/ ./| ' /(__   panic...  Oops.
> \_||_/|_||_|_\\___/  \_-_/|_|\__\|_|_\ __)
> [ Mike Hicks | http://umn.edu/~hick0088/ | mailto:hick0088@tc.umn.edu ]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
> 
>