I saw this post but it didn't help me (I couldn't figure how to add "" and add to the existing string).
I'm trying to create a script that combines all mp3 files in a directory into one file using the "cat" command and give the new file the name of the directory its in.
RES
dirName=${PWD##*/}
for entry in *.mp3; do
RES="${RES} ${entry}"
done
#echo "$foo"
cat ${RES} > ${dirName}
Since the file names have spaces I get the following error
cat: 01: No such file or directory
cat: רצועה: No such file or directory
cat: 1.mp3: No such file or directory
cat: 02: No such file or directory
Thanks