Convert ogg to mp3 With Sox

by Scott, Revised on January 25, 2013 (MusicOpen Source)

I do not know if I will use this again, but it was very usefule once so I thought I would copy it here. The command below transforms the whole directory from ogg in mp3.

for i in *.ogg; do sox "$i" "${i/.ogg}".mp3; done

This next command is for one at a time.

sox audio.ogg audio.mp3

Tags: MusicOpen Source