Hi Guys.
I have a huge file with the following format:
__415068.737_2034568.082____2488.000255___0___0__1_2ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__415113.412_2034444.670____2596.000255___0___0__1_2ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__415134.685_2034385.902____2636.000255___0___0__1_3ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__417259.277_2036924.200____3412.000132__33_191____1MZTN_SAL_PRES______________________UNKNOWN_____________LGC__TIME
__417178.007_2036820.533____3328.000132__33_191____2MZTN_SAL_PRES______________________UNKNOWN_____________LGC__TIME
NOTE: Undescores ( _ ) are in fact blanks ( whitespaces ).
My desired output:
__415068.737_2034568.082____2488.000255___0___0__1_2ALMEJA_FN1+90_LMLv_v2_______________UNKNOWN_____________LGC__TIME
__415113.412_2034444.670____2596.000255___0___0__1_2ALMEJA_FN1+90_LML_v2________________UNKNOWN_____________LGC__TIME
__415134.685_2034385.902____2636.000255___0___0__1_3ALMEJA_FN1+90_LML_v2________________UNKNOWN_____________LGC__TIME
__417259.277_2036924.200____3412.000132__33_191____1MZTN_SAL_PRES_v2____________________UNKNOWN_____________LGC__TIME
__417178.007_2036820.533____3328.000132__33_191____2MZTN_SAL_PRES_v2____________________UNKNOWN_____________LGC__TIME
I need to append a "_v2" suffix to this column_____________^^^^^^^^^^^^^^^^^^^^^^
As you can see, there are some times that the column is #7, but some other times it is #6, so its not easy for me to use awk in this case.
I need to keep spacing in the output.
I also tried sed, but don't know how the specify the position of the string I want to add the suffix to.
Thank you very much for your help guys. I come here when spent a lot of time trying to solve the problem with no success.
I have a huge file with the following format:
__415068.737_2034568.082____2488.000255___0___0__1_2ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__415113.412_2034444.670____2596.000255___0___0__1_2ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__415134.685_2034385.902____2636.000255___0___0__1_3ALMEJA_FN1+90_LML__________________UNKNOWN_____________LGC__TIME
__417259.277_2036924.200____3412.000132__33_191____1MZTN_SAL_PRES______________________UNKNOWN_____________LGC__TIME
__417178.007_2036820.533____3328.000132__33_191____2MZTN_SAL_PRES______________________UNKNOWN_____________LGC__TIME
NOTE: Undescores ( _ ) are in fact blanks ( whitespaces ).
My desired output:
__415068.737_2034568.082____2488.000255___0___0__1_2ALMEJA_FN1+90_LMLv_v2_______________UNKNOWN_____________LGC__TIME
__415113.412_2034444.670____2596.000255___0___0__1_2ALMEJA_FN1+90_LML_v2________________UNKNOWN_____________LGC__TIME
__415134.685_2034385.902____2636.000255___0___0__1_3ALMEJA_FN1+90_LML_v2________________UNKNOWN_____________LGC__TIME
__417259.277_2036924.200____3412.000132__33_191____1MZTN_SAL_PRES_v2____________________UNKNOWN_____________LGC__TIME
__417178.007_2036820.533____3328.000132__33_191____2MZTN_SAL_PRES_v2____________________UNKNOWN_____________LGC__TIME
I need to append a "_v2" suffix to this column_____________^^^^^^^^^^^^^^^^^^^^^^
As you can see, there are some times that the column is #7, but some other times it is #6, so its not easy for me to use awk in this case.
I need to keep spacing in the output.
I also tried sed, but don't know how the specify the position of the string I want to add the suffix to.
Thank you very much for your help guys. I come here when spent a lot of time trying to solve the problem with no success.