renaming *.wav.mp3 to *.mp3 only

Antonio Olivares olivares14031 at yahoo.com
Wed Jun 8 21:21:32 UTC 2005



--- Will Yardley <fedora-list at veggiechinese.net>
wrote:

> On Wed, Jun 08, 2005 at 01:50:24PM -0700, Antonio
> Olivares wrote:
> 
> > I copied a script from the internet but it did not
> work to encode mp3
> > and I modified it so that I could get some output
> and it came to
> > *.wav.mp3 
> 
> > Here's the script 
> > #!/bin/sh
> > for i in *.[wW][aA][vV]; do
> >   lame "$i"  "$i".mp3
> > done
> > 
> > The resultant mp3 files had the *.wav.mp3 as I do
> not
> > know how to modify the results.
> 
> Something like this should work:
> 
> for i in *.[wW][aA][vV]; do
>    lame "${i}"  "`echo ${i} | sed "s/\.wav//"`.mp3"
> done
> 
> jazz:$ ls
> 1.wav  2.wav  3.wav  I like poo.wav
> jazz:$ for i in *.wav ; do mv "${i}" "`echo ${i} |
> sed "s/\.wav//"`.mp3" ; done 
> jazz:$ ls -al
> total 24
> drwxr-xr-x   2 william william  4096 Jun  8 14:13 ./
> drwxr-xr-x  39 william william 20480 Jun  8 14:10
> ../
> -rw-r--r--   1 william william     0 Jun  8 14:10
> 1.mp3
> -rw-r--r--   1 william william     0 Jun  8 14:10
> 2.mp3
> -rw-r--r--   1 william william     0 Jun  8 14:10
> 3.mp3
> -rw-r--r--   1 william william     0 Jun  8 14:13 I
> like poo.mp3
> 
> -- 
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe:
> http://www.redhat.com/mailman/listinfo/fedora-list
> 

It works!!!  Thanks to all.  This is a very valuable
resource and am grateful to be a member in this list.

Regards,

Antonio

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the users mailing list