Skip to content

Instantly share code, notes, and snippets.

@KeenS
Created September 29, 2013 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KeenS/6751314 to your computer and use it in GitHub Desktop.
Save KeenS/6751314 to your computer and use it in GitHub Desktop.
A shell function to migrate music files to mp3.
function migrate_to_mp3 (){
for f in *.$1
do
mp3=${f%.$1}.mp3
if [ ! -f $mp3 ];then
ffmpeg -i $f $mp3
fi
rm $f
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment