How to create a bash file?
I found following bash script.
#!/bin/bash
for f in *.wav; do
echo "Processing $f file..."
afconvert -f caff -d LEI16@44100 -c 1 "$f" "${f/wav/caf}"
done
I have Mac and Windows.
But I don’t know where I have to put this and how I can run this script?
As you have two different OS setup, I will split my answer in two parts.
First: Windows
Windows does not have a Bash interpreter, nor the
afconvertprogram the code above is trying tu run. Your best bet will be to use Cygwin to install a Unix console on your Windows. Also I don’t know, where you could getafconvertfrom.OSX
OSX does have a console and the
afconvertsoftware (at least my OSX does). You can simply drop the file in a folder and give it a name ending in.sh. Then you should be able to run it.