I want to write a bash script to move every file in one subfolder into another subfolder of the same name in a different folder. I tried the following script, which I called merge.bash:
file_path=/home/path/folder
mv subfolder/* "$file_path"/subfolder
When I ran this with:
bash merge.bash
It returned the error:
mv: target '/home/path/subfolder'$'\r' is not a directory
Why has it added '$'\r ?