I'm using Bash on Ubuntu and my issue is the following:
I have dozens of .TXT
files in a certain folder.
As far as I know, all of them have a header (I believe every header holds on 1 line but not 100% sure). However, they do not necessary share the same header. Five files might have the same header while another file might have a unique header.
Ultimately, what I would like to do is concatenate the files that share the same header. The answers to the following question (Concatenate multiple files with same header) explain how to concatenate multiple files with the same header, however in my case I would first need to group the files sharing the same header before concatenating them (and only keep the header of first file among said groups).
Any ideas are welcome :) Thank you !