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.

Required fields*

4
  • Is this the entirety of the code? I can see some unused variables. I wonder if there is some kind of recursion? You can also debug with echo, e.g. repeat the cp… line with echo cp… above it, then see if the variables are as expected, and if it repeats unexpectedly. Commented Feb 13, 2019 at 11:35
  • @Sparhawk Sorry I was only using that one variable to test it, have edited post. It was part of a larger code but have deleted everything to eleminate problems but even with just the code you see above I am having the same re-occuring copy problem. Commented Feb 13, 2019 at 11:40
  • Is there a symlinks? Commented Feb 13, 2019 at 11:45
  • @roaima apologies typo, now corrected Commented Feb 13, 2019 at 12:40