Converting mp3 to wav

Anthony Hologounis plug-discuss@lists.plug.phoenix.az.us
Wed, 30 Jan 2002 22:14:56 -0700


Wow..this thread is still going..I was the original poster. And yes spaces in 
file names ARE evil and unnatural...as I found out......

I run a seperate script initially to get rid of the spaces. It looks like 
this.

#!/bin/sh
#remove white space from files with the tr command
for i in *;do
      mv "$i"  `echo $i | tr ' ' '-' `
done

It seems to do the trick

Anthony

On Wednesday 30 January 2002 09:26 pm, you wrote:
> Am 30. Jan, 2002 schwätzte Hunter Kreie so:
> > I had the same concern. At first I thought "What about filenames
> > containing spaces? Each element will be treated as a different file."
> > Correct me if I am wrong, but I'm pretty sure the script Douglas wrote
> > takes care of this.
> >
> > >#!/bin/sh
> > >#
> > >ls *.mp3 | while read i
> > >    do
> > >        o=$(echo "$i" | sed -e "s/mp3/wav/")
> > >        mpg123 -b 10000 -s "$i" | sox -t raw -r 44100 -s -w -c2 - "$o"
> > >    done
> > >## eof
> >
> > This pipes each line, rather than each element, of the output of ls to
> > the read command in the while. So if we had ./Bullet With Butterfly Wings
> > - Smashing Pumpkins.mp3, i="Bullet With Butterfly Wings - Smashing
> > Pumpkins.mp3" in the first iteration, rather than just "Bullet".
>
> Technically, you're correct. The proper answer, however, is "Spaces in file
> names are evil and unnatural. They should be banned and you should simply
> removed them from any filesystem where they are encountered!" :).
>
> rm -rf /home/lufthans/tmp/mnt/dows/c:/Program\ Files/  # ;-)
>
> ciao,
>
> der.hans