I have a list of files (see below) I need to merge into separate files (merge1, merge2). merge1 would contain file1a_1 and file1a_2; merge2 would contain file2a_1, file2a_2.
I tried
find . -name "file*_*" -exec cat {} \; >> mergefile*
i.e. Files:
file1a_1
X1a_2
file1a_3
file1b_1
file1b_2
file1b_3
The shell script puts all the files into merge file and doesn't separate them out individually.
Any assistance would be appreciated
file*_*files in subdirectories, or all in the current directory? I'm assuming theX1a_2is meant as an example of a file to omit?