Samuel Sieb wrote:
> Close, but that will give you output files like filename.m4a.mp3.
> 
> for f in *.m4a; do ffmpeg -i "$f" "${f%.m4a}.mp3"; done

You can also use "${f/%m4a/mp3}" in bash and zsh (and
possibly other shells, but I'm not familiar with pattern
substitution in others).  The % at the beginning of the
pattern achors the match to the end of the string.

(Not that it's important; I just like playing shell golf. :)

-- 
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dope will get you through times of no money better than money will get
you through times of no dope.
    -- Freewheelin' Franklin

Attachment: signature.asc
Description: PGP signature

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to