I am hoping someone can help me find a way to sum two columns but output the answer into a separate file using the first row of the original file as such:
0000229351,4,5.00,533017068270,31.96,UPAC
0000229351,4,3.00,533017068280,27.08,UPAC
0000229351,4,5.00,533017068291,31.96,UPAC
0000229351,4,5.00,533017068306,31.96,UPAC
Desired Output:
0000229351,4,18.00,533017068270,122.96,UPAC
I am targeting columns 3 and 5 in this example and using the information from row 1 in columns 1,2,4,6. Any help with this issue would be greatly appreciated. Thank you.
0000229351,4,5.00,533017068270,31.96,UPAC
0000229351,4,3.00,533017068280,27.08,UPAC
0000229351,4,5.00,533017068291,31.96,UPAC
0000229351,4,5.00,533017068306,31.96,UPAC
Desired Output:
0000229351,4,18.00,533017068270,122.96,UPAC
I am targeting columns 3 and 5 in this example and using the information from row 1 in columns 1,2,4,6. Any help with this issue would be greatly appreciated. Thank you.