Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • You seem to be including quotes when entering the destination name. If so, leave them out. If not, add set -x to the script to see what's going on there. Commented Apr 17, 2021 at 3:58
  • cp -a includes -R, so you don't need that option (and rsync also has an -a / --archive option). You also don't need that loop, replace "$i" with "$@". Commented Apr 17, 2021 at 4:15
  • @berndbausch Thank you very much! Leaving out the quotes solved my problem. Commented Apr 17, 2021 at 4:58
  • @Freddy Thank you for your suggestion. I removed the loop and changed the rsync/cp options per your recommendation. Commented Apr 17, 2021 at 4:59