So I'm looking for a way to cat .html files in multiple subfolders, but by keeping them in their place.
Actual situation:
$ Folder1
.
├── Subfolder1
│   └── File1.html
    └── File2.html
├── Subfolder2
│   └── File1.html
    └── File2.html
Desired outcome:
$ Folder1
.
├── Subfolder1
│   └── Mergedfile1.html
    └── File1.html
    └── File2.html
├── Subfolder2
│   └── Mergedfile2.html
    └── File1.html
    └── File2.html
So far I've came up with this:
find . -type f -name *.html -exec cat {} + > Mergedfile.html
But this combines all the files of all the subfolders of Folder1, while I want to keep them separated.
Thanks a lot!
 
     
     
    