#!/bin/bash # converts .ogg files to .mp3 # because some iriver portable players can't handle .ogg format, # they can only handle .mp3 format for i in *.ogg do o="${i/.ogg/.mp3}" if [ -f "$o" ] then echo "$o" already exists! exit fi ogg123 -d wav -f - "$i" | lame -b 320 -h - > "$o" done