Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wav,Aiff -> Ogg sh conversion script
#!/bin/sh
# Convert wav and aiff files (named with .wav and .aiff) to 320kbps Ogg Vorbis
for i in *; do
suffix="${i##*.}"
if [ "$suffix" = wav ] || [ "$suffix" = aiff ]; then
avconv -i "$i" -b 320k "${i%$suffix}ogg"
printf "Converted %s to %s\n" "$i" "${i%$suffix}ogg"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment