I use a shell script that takes a single directory, called NewData, with whatever is inside of it, and creates this:

There is one step I want to add, and I am not sure how to do it. I want to move the contents of NewData and NewDataCopy into their respective parent directories (ProtectedOrig and Data) and delete NewData and NewDataCopy. What command(s) would I add to my script to do this without specifically naming the files to be moved (they will be different every time I run the script)?
If it would help, you can have a look at the script here. I’m grateful for whatever assistance I can get!
You can move everything without naming the files specifically by using a “glob” (aka a “wildcard”). That’s a
*.So let’s say you are in
DataDirectory. You can move everything fromData/NewDataCopyup toDataby doing this:mv Data/NewDataCopy/* Data/. Then delete with armdir Data/NewDataCopy.Starting from
DataDirectorythen to do everything you’d do this: