Skip to content

Instantly share code, notes, and snippets.

@thelionroars
Created December 9, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thelionroars/28ae336cd79377f64b36 to your computer and use it in GitHub Desktop.
Save thelionroars/28ae336cd79377f64b36 to your computer and use it in GitHub Desktop.
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