#!/bin/bash for file in *.ogg; do OUTPUT=${file%.ogg} echo $OUTPUT ffmpeg -i "$file" "$OUTPUT.mp3" done printf "\nDelete original files? (y / n) " read answer [[ $answer == "y" ]] && rm -f *.ogg || echo > /dev/null