(FYI, I have very little shell scripting knowledge)
I have a ton of files and directories that look something like
-root
-dir1/a.txt
-dir2/a.txt
-dir3/b.txt
-dir4/b.txt
-dir5/c.txt
I would like to be able to combine/concat all the files with the same file names together, and then put everything in the root. So the end result would look like
-root/a.txt (combined from dir1 and dir2)
-root/b.txt (combined from dir3 and dir4)
-root/c.txt
If that's not possible, I'd even settle for moving all the files to the root, and doing a batch rename. So something like
-root/a.txt.1
-root/a.txt.2
-root/b.txt.1
-root/b.txt.2
-root/c.txt.1
Hope that makes sense, and thanks in advance :)