I feel like this should be simple but I'm really stuck. I'm working on a project dealing with gene family evolution in marine invertebrates. I have a file (see example below) that contains 36 columns (one per species) delimited by tabs. The first row contains the species names and the successive rows each represent one gene.
I am trying to find multiple specific lines in a file (species) and then print only the 5th line after each species name to a new file. I can do this fine for each species individually, but I am having trouble making a loop to go through each of the 1000 species I have in the document.