[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Losing '_b00jdlb8_default' from a files name?



I am using this script to convert radio programmes downloaded with
'get-iplayer' from '*.m4a' to '*.mp3', and it works very well. 

for i in *.m4a;
			do faad "$i"
				x=`echo "$i"|sed -e 's/.m4a/.wav/'`
				y=`echo "$i"|sed -e 's/.m4a/.mp3/'`
				lame -h -b 192 "$x" "$y"
				rm -f "$x"
			done;

But, there is a problem. They come in this format -
'15_Minute_Drama_-_AM_Homes_-_This_Book_Will_Save_Your_Life_Episode_5_b00jdlb8_default.m4a'
	
How can I lose the '_b00jdlb8_default' section please? It is always
in this format but with different letters and numbers in the section
before 'default'. 

I have quite a few programmes already converted so I also need to be
able to use this ability on them too. I would welcome another script
that could perform this please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
Debian testing, Fluxbox 1.3.5, emacs 24.3.50.1
Registered Linux user 561944

Attachment: signature.asc
Description: PGP signature


Reply to: