linux - How to add two columns with a list of different values -


I have a file that looks like this:

  893 990 1000 1020 1500 1655 0/1 1/1 0/1 1/0. 0/1 1/1 1/0. . 1/1 0/1 1/0/0/0/0   

How do I add two columns with different values ​​so that the output can look like this:

  ID population 8939 9 1000 1000 1020 1500 1655 AD0062 Pop 1 0/1 1/1 0/1 1/0 AD0063 Pop 1 0/1 1/1 1/0 AD0101 Pop 1. 1/1 0/1 1/0/0/0   

Any hint? Thank you.

  awk '{print} id \ t generation \ t "$ 0}' input_file < / Code>  

It has been given that IDs and populations are fixed.

Comments