Why do this?
Because you have a heap of CD audio tracks ripped to Raw format by k3b, however the software intended to use those depends on some kind of file structure.
So... place this in ~/bin/raw2wav.sh & mark it executable (chmod a+x):
find . -type f -name '*.raw' -exec raw2wav.sh {} \;
Because you have a heap of CD audio tracks ripped to Raw format by k3b, however the software intended to use those depends on some kind of file structure.
So... place this in ~/bin/raw2wav.sh & mark it executable (chmod a+x):
#!/bin/shApply this using a command like:
if [ -f "$1" ]; then
echo WAVifying [$1]
sox -V -r 44100 -b 16 -c 2 -s "$1" "$(dirname "$1")/$(basename "$1" .raw).wav"
fi
find . -type f -name '*.raw' -exec raw2wav.sh {} \;
Comments