TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:18790] quick way to strip spaces...
David Wood <jbevren@yahoo.com> writes:
> On Fri, 9 Jun 2000, Brian Ackermann wrote:
>
> > anybody got a quick way strip spaces from a filename, preferably one that
> > will do globbing and perhaps recursion?
> >
> > I've got a whole bunch of mp3 uploaded to my new RIMPS server, from various
> > places, and I'd really like to eliminate the spaces in the names. Rimps
> > works just fine with them, but its troublesome to me...
>
> for i in `find -name *.mp3`; do mv $i `echo $i | sed s/\ /-/`; done
>
You might get a buffer full message that way try this:
find -name *.mp3` -exec mv {} `echo {} | sed s/\ /-/`\;
--
Jon Schewe
http://eggplant.mtu.net/~jpschewe
schewe@tcfreenet.org