I have a file of 800+ rows. Each row has a certain number of individuals we have to measure a trait on (n = 3, 5 or 10).
I would like to expand the file so each individual has their own row based on the number we needed to measure (n).
Row Who/What Description n 8001 Maize line Control 3
Row Who/What Description n 8001 Maize line Control 3 8001 Maize line Control 3 8001 Maize line Control 3
I am not proficient in Unix (still learning!), but I get that I'd need to read in the txt/csv file, then copy based on the n in the fourth column. I would not need to repeat the column headers, that was just for organization. Can someone help me with this?