Hello, I am new to learning awk. I have this input and I would like to obtain this output. How I can resolve it?
Input:
lastname firstname geneABC232 geneB12 geneG33
Smith John 1 0 0
Smith John 0 1 0
Smith John 0 1 1
Smith John 0 0 1
Cage Alfred 1 0 0
Cage Alfred 1 1 0
Cage Alfred 0 0 0
Output:
lastname firstname geneABC232 geneB12 geneG33
Smith John 1 1 1
Cage Alfred 1 1 0
Input:
lastname firstname geneABC232 geneB12 geneG33
Smith John 1 0 0
Smith John 0 1 0
Smith John 0 1 1
Smith John 0 0 1
Cage Alfred 1 0 0
Cage Alfred 1 1 0
Cage Alfred 0 0 0
Output:
lastname firstname geneABC232 geneB12 geneG33
Smith John 1 1 1
Cage Alfred 1 1 0