I have files Deep.flac
and A1 - Rolling In The Deep.flac
I wrote the script below, however it can only work with Deep.flac
It cannot seem to work with filenames with spaces. I am learning unix system though my OSX.
Basically, I am using sox
to convert my flac to aiff while keeping the name of the files intact.
My Script convertX2Y.sh:
#!/bin/bash
# Author: Rei Yash Dean
# Copyright: Free
# Script: to convert flac files to aiff using sox; while keeping file name unchanged
for x in *.flac;
do sox $x $(basename $x .flac).aiff;
done
The error it returns is:
sox FAIL formats: can't open input file `The': No such file or directory
echo
betweendo
andsox
. – Cyrus Jul 13 '14 at 08:18