I am writing a bash script to copy/move a folder called "folder" to a directory that already contains "folder" and I would like the contents to be merged.
I am attempting to use a solution from this question:
cp -rl source/folder destination rm -r source/folder
If i type the first line in the terminal, source "folder" and destination "folder" are merged as expected.
However, When i run the script with the line in it, instead of merging the folders the destination now contains two folders; "folder" and "blank", where "blank" has the contents of the source "folder" in it.