Alright, I cannot figure out how to do this.I have a fileA which looks like this :([7]RIMS_ID)                                            : CNR       (refGain_A[7])                                          : 1           (RIMSclockBias_A[7])                                    : -398015316.7(RIMSclockDrift_A[7])                                   : -6442.29    (RIMSclockSigma_A[7])                                   : .01         (RIMSclockSigY_A[7])                                    : 0        ([8]RIMS_ID)                                            : ABS       (refGain_A[8])                                          : 1           (RIMSclockBias_A[8])                                    : -374515458(RIMSclockDrift_A[8])                                   : -6442.29    (RIMSclockSigma_A[8])                                   : .01         (RIMSclockSigY_A[8])                                    : 0     and so on where the [index] goes from 0 to 71 and each station has a different ID.I want to replace the value corresponding to RIMSclockBias_A string of each station with a value I have on another fileB like this:CNR -44163754.49ABS 3417370.112...So to have:([7]RIMS_ID)                                            : CNR       (refGain_A[7])                                          : 1           (RIMSclockBias_A[7])                                    : -44163754.49(RIMSclockDrift_A[7])                                   : -6442.29    (RIMSclockSigma_A[7])                                   : .01         (RIMSclockSigY_A[7])                                    : 0        ([8]RIMS_ID)                                            : ABS       (refGain_A[8])                                          : 1           (RIMSclockBias_A[8])                                    : 3417370.112(RIMSclockDrift_A[8])                                   : -6442.29    (RIMSclockSigma_A[8])                                   : .01         (RIMSclockSigY_A[8])                                    : 0 I can isolate the correct field with a combination of grep in a for loop and awk, but I don't know how I can replace the value in the file itself. sed needs to know the exact value I want to replace as input so it is not feasible.Any idea?
Substitute text fields with values from other file
text processing