I have a list of numbers which i would like to add to the end of another file as the final column:
1:.196
5:.964
6:.172
The numbers in front (1,5 and 6) indicate at which line the numbers have to be appended in the target file, so that the first line ends with .196
, the fifth with .964
and so on. The usual paste file1 file2
does not take the line numbers into account and simply adds 1:.196
at the end of the first line and .964
at the end of the second instead of the fifth. Any ideas how to do it the right way?
Expected would be something like this:
Lorem Ipsum 1238 Dolor Sit 4559.196
Lorem Ipsum 4589 Sit elitr 1234
Lorem Ipsum 3215 Dolor Sit 5678
Lorem Ipsum 7825 Dolor Sit 9101
Lorem Ipsum 1865 Dolor Sit 1234.964