-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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