The exec
command replaces the command being executed in the current process with a new command. It's like a subroutine call that never returns. In this case, you simply want to call sox
, and continue after it returns, so just drop the exec
:
while read mp3; do
read -u3 ogg
sox "Musicmp3/$mp3" "Musicogg/$ogg"
done < Filemp3.txt