I have a folder called P1. How can I make 59 copies of that folder but naming them incrementally, i.e., the new folders are named as P2,P3,...,P60?
Here's what I did, but it didn't work:
I made 59 copies manually and then tried to rename them using:
j=2;for f in /path/to/folders/*; do mv "$f" "$j"; let j=j+1; done
but instead all of my copied files including the original file were deleted from the directory.
What was wrong with the command I wrote and how I can do all the copying and renaming automatically?