I have a table like this:
N1.txt N04_28 31022 39154 t1-8133/8133
N1.txt N04_28 40504 47604 1-7101/7101
N1.txt N05_159 1 6348 t1-6348/8133
N1.txt N05_159 7698 14798 1-7101/7101
N2.txt N06_30 1 6490 t1-6490/8133
N2.txt N06_30 7840 14940 1-7101/7101
N3.txt N07_170 1 6285 t1-6285/8133
N4.txt N07_170 7635 14735 t1-7101/7101
I would like to look only into the first column and, if the row contain the same string I want to combine the rows in a single row. The output should be something like this:
N1.txt N04_28 31022 39154 t1-8133/8133 N04_28 40504 47604 1-7101/7101 N05_159 1 6348 t1-6348/8133 N05_159 7698 14798 1-7101/7101
N2.txt N06_30 1 6490 t1-6490/8133 N06_30 7840 14940 1-7101/7101
N3.txt N07_170 1 6285 t1-6285/8133
N4.txt N07_170 7635 14735 t1-7101/7101
I thouhgt I could do that in awk, but I am afraid my skills are limited.
I looked at this question which looked similar, but of course, it binds everything if I change the /@/
with /*.txt/
I am doing these things over and over and I really would like to learn how to do it properly and efficiently. Thank you