Skip to content

Instantly share code, notes, and snippets.

@clauswitt
Last active August 29, 2015 14:04
Show Gist options
  • Save clauswitt/09b680f7a52ff31465ad to your computer and use it in GitHub Desktop.
Save clauswitt/09b680f7a52ff31465ad to your computer and use it in GitHub Desktop.
sox convert files from aif to wav (with a filename change as well) recursively from current dir
#!/bin/zsh
OLDIFS=$IFS
IFS=$'\n'
for file in `find . -name '[0-9]*_[0-9a-z]*aif'`; do
dir=`dirname "$file"`
base=`basename "$file"`
wav_base=`echo "$base" | cut -d '-' -f1`
sox "$file" $dir/$wav_base.wav
done
IFS=$OLDIFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment