Hi All,
I have two files
file1:
abc,def,ghi,5,jkl,mno
pqr,stu,ghi,10,vwx,xyz
cba,ust,ihg,4,cdu,oqw
file2:
ravi,def,kishore
ramu,ust,krishna
joseph,stu,mike
I need two output file as follows
If field3 in file1 is same as field3 in the next line then the field4 should add upto field4 in the next line and i should get a unique output as follows
ouput:
abc,def,ghi,15,jkl,mno
cba,ust,ihg,4,cdu,oqw
can somebody please help me with this as i require it pretty urgently. I am using sun solaris. If we can get the output using sed or awk that would be great. Any other way is also appreciated.
Thanks in advance..........