I am currently using this simple cat to combine gzip tab-delimited files. However, since both have the same column header, I am ending up with one header at the beginning of the file and another header at the middle, where it was concatenated. How can I leave just one header for the c.gz file without having to decompress the files?
Example of the files:
a.tab
col1 col2 col3
1 2 3
b.tab
col1 col2 col3
1 4 6
desired c.tab
col1 col2 col3
1 2 3
1 4 6
What I am trying: cat a.tab.gz b.tab.gz > c.tab.gz
What I am getting in the c.tab:
col1 col2 col3
1 2 3
col1 col2 col3
1 4 6