Created
June 17, 2014 19:49
-
-
Save briansorahan/4e53aa6eb80a18a3dfe4 to your computer and use it in GitHub Desktop.
copy files from a sony pcmd50 and fix the file extensions
This file contains hidden or 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/bash | |
# | |
# Copy audio files from a Sony PCM-D50 and | |
# change the file extension from .WAV to .wav | |
# | |
function main { | |
local src=/media/brian/PCMRECORDER | |
local dst=. | |
if [ $# -ge 1 ]; then | |
src="$1" | |
fi | |
if [ $# -ge 2 ]; then | |
dst="$2" | |
fi | |
local newname= | |
for f in $(find $src -name '*.WAV'); do | |
newname=$dst/$(basename ${f/%.WAV/.wav}) | |
cp $f $newname | |
done | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment