On Mon, Oct 20, 2008 at 04:22:41PM +0800, jam wrote: > Over the years I have seen many offerings on this topic, which I've mostly > ignored until I need to do it and discover ITS HARD. Any kind input please: > > Oggs are now divided into oga and ogv. Kewl except some tools won't read .oga > eg amarok and fiddling the mime types helps not. > > Brilliant, I'll just call all ogas oggs. So I've a directory dotted with > Music/Jimi Hendrix/The wind calls Mary.oga (whatever) and I want to mv them > to > .ogg. Hours later, I can make a doit file and quote the args eg > > ==== doit ==== > mv "Music/Jimi Hendrix/The wind calls Mary.oga" "Music/Jimi Hendrix/The wind > calls Mary.ogg" > ... > ... > > but I'd really like to be a bit cleverer. > James
doit file of #!/bin/dash mv -i "$1" "${1/.oga/ogg}" and then a command like find -type f -name '*.oga' -exec doit "{}" \; > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html >
signature.asc
Description: Digital signature
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html