LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Strip first three characters from filename

[ILUG] Strip first three characters from filename

john Moylan john at nuatech.net
Sun Aug 10 11:25:38 IST 2008


for i in `ls *.mp3`; do cut  -d "_" -f2-; done

2008/8/10 <ollie at eillo.org>

>
> I have a ton of mp3 files that I'm currently sorting the id3 tags for.
> Each filename starts with the tracknumber followed by an underscore.
>
> e.g. 01_SONG_NAME_-_ARTIST_NAME_-_ALBUM_NAME.mp3
>
> Because i have a unique separator between the SONG, ALBUM and BAND name
> '_-_'
> i can use my audio tag software to populate the ID3 tag fields
> appropriately.
>
> However the track number is separated from the band name by an underscore
> and the
> software isn't flexible enough to tell the difference.
>
> So i need a shell script that will loop through a directory and
> strip the first three characters from each filename.
>
> Can this be easily done in shell?
>
> If not i can do it in python but id rather not.
>
> Cheers,
>       Oliver.
>
> --
> Irish Linux Users' Group mailing list
> About this list : http://mail.linux.ie/mailman/listinfo/ilug
> Who we are : http://www.linux.ie/
> Where we are : http://www.linux.ie/map/
>



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell